[gegl/wip/rishi/my-patches: 7/7] operations/transform/rotate-on-center: Simplify code



commit c0695c7561c968d1d4b736dc46195e7d583c32cc
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Nov 21 18:17:31 2017 +0100

    operations/transform/rotate-on-center: Simplify code
    
    Improves readability by clarifying the significance of the value.

 operations/transform/rotate-on-center.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/operations/transform/rotate-on-center.c b/operations/transform/rotate-on-center.c
index f4172d4..5e82636 100644
--- a/operations/transform/rotate-on-center.c
+++ b/operations/transform/rotate-on-center.c
@@ -94,11 +94,11 @@ generate_matrix (GeglMatrix3 *matrix,
    */
   matrix->coeff [0][0] =  cos (radians);
   matrix->coeff [0][1] =  sin (radians);
-  matrix->coeff [0][2] = -tx - x*cos (radians) - y*sin (radians);
+  matrix->coeff [0][2] = -tx + tcoords[0][0]);
 
   matrix->coeff [1][0] = -sin (radians);
   matrix->coeff [1][1] =  cos (radians);
-  matrix->coeff [1][2] = -ty + x*sin (radians) - y*cos (radians);
+  matrix->coeff [1][2] = -ty + tcoords[0][1]);
 
   matrix->coeff [2][0] = 0;
   matrix->coeff [2][1] = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]