[gegl] operations: some style cleanup in the transform ops



commit d0c7c11862e491db74cc8803ecc7d7fe0d9bc62f
Author: Michael Natterer <mitch gimp org>
Date:   Mon Apr 2 01:50:09 2012 +0200

    operations: some style cleanup in the transform ops

 operations/transform/reflect.c   |    8 ++++----
 operations/transform/rotate.c    |    6 +++---
 operations/transform/scale.c     |    8 +++++---
 operations/transform/shear.c     |    6 +++---
 operations/transform/transform.c |    2 +-
 operations/transform/translate.c |    6 +++---
 6 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/operations/transform/reflect.c b/operations/transform/reflect.c
index 39a7b18..a9851ed 100644
--- a/operations/transform/reflect.c
+++ b/operations/transform/reflect.c
@@ -26,9 +26,9 @@
 #ifdef GEGL_CHANT_PROPERTIES
 
 gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
-  _("Direction vector's X component"))
+                   _("Direction vector's X component"))
 gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
-  _("Direction vector's Y component"))
+                   _("Direction vector's Y component"))
 
 #else
 
@@ -39,11 +39,11 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
 #include <math.h>
 
 static void
-create_matrix (OpTransform    *op,
+create_matrix (OpTransform *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
-  gdouble ux=0, uy=0;
+  gdouble ux = 0, uy = 0;
   gdouble l;
 
   ux = chant->x;
diff --git a/operations/transform/rotate.c b/operations/transform/rotate.c
index 8bc8323..0ed53a8 100644
--- a/operations/transform/rotate.c
+++ b/operations/transform/rotate.c
@@ -22,7 +22,7 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-gegl_chant_double (degrees, -G_MAXDOUBLE, G_MAXDOUBLE, 0.,
+gegl_chant_double (degrees, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
                    _("Angle to rotate (clockwise)"))
 
 #else
@@ -35,11 +35,11 @@ gegl_chant_double (degrees, -G_MAXDOUBLE, G_MAXDOUBLE, 0.,
 #include <math.h>
 
 static void
-create_matrix (OpTransform    *op,
+create_matrix (OpTransform *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
-  gdouble radians = chant->degrees * (2 * G_PI / 360.);
+  gdouble radians = chant->degrees * (2 * G_PI / 360.0);
 
   matrix->coeff [0][0] = matrix->coeff [1][1] = cos (radians);
   matrix->coeff [0][1] = sin (radians);
diff --git a/operations/transform/scale.c b/operations/transform/scale.c
index 7c9a960..acfe787 100644
--- a/operations/transform/scale.c
+++ b/operations/transform/scale.c
@@ -22,8 +22,10 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 1., _("Horizontal scale factor"))
-gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1., _("Vertical scale factor"))
+gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
+                   _("Horizontal scale factor"))
+gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
+                   _("Vertical scale factor"))
 
 #else
 
@@ -35,7 +37,7 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1., _("Vertical scale factor"))
 #include <math.h>
 
 static void
-create_matrix (OpTransform    *op,
+create_matrix (OpTransform *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
diff --git a/operations/transform/shear.c b/operations/transform/shear.c
index 114d774..02ffc34 100644
--- a/operations/transform/shear.c
+++ b/operations/transform/shear.c
@@ -22,9 +22,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 1.,
+gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
                    _("Horizontal shear amount"))
-gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.,
+gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
                    _("Vertical shear amount"))
 
 #else
@@ -37,7 +37,7 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.,
 #include <math.h>
 
 static void
-create_matrix (OpTransform    *op,
+create_matrix (OpTransform *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
diff --git a/operations/transform/transform.c b/operations/transform/transform.c
index 57f33be..5ddf4e9 100644
--- a/operations/transform/transform.c
+++ b/operations/transform/transform.c
@@ -34,7 +34,7 @@ gegl_chant_string (transform, "", _("Transformation string"))
 #include <math.h>
 
 static void
-create_matrix (OpTransform    *op,
+create_matrix (OpTransform *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
diff --git a/operations/transform/translate.c b/operations/transform/translate.c
index 90a571f..32d2995 100644
--- a/operations/transform/translate.c
+++ b/operations/transform/translate.c
@@ -22,9 +22,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 1.,
+gegl_chant_double (x, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
                    _("Horizontal translation"))
-gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.,
+gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
                    _("Vertical translation"))
 
 #else
@@ -37,7 +37,7 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.,
 #include <math.h>
 
 static void
-create_matrix (OpTransform    *op,
+create_matrix (OpTransform *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);



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