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



commit 4a96f01e06d4b1eca82391f981971503f2f0bc44
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..e2daa9a 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]