[gegl] mixed type arithmetic



commit 57afc911eab5264162fcca4b160e723f986ec69b
Author: Nicolas Robidoux <nicolas robidoux gmail com>
Date:   Wed Jun 22 20:29:29 2011 -0400

    mixed type arithmetic

 gegl/buffer/gegl-sampler-lohalo.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-lohalo.c b/gegl/buffer/gegl-sampler-lohalo.c
index 05c61a1..d0319f8 100644
--- a/gegl/buffer/gegl-sampler-lohalo.c
+++ b/gegl/buffer/gegl-sampler-lohalo.c
@@ -2143,15 +2143,14 @@ gegl_sampler_lohalo_get (      GeglSampler* restrict self,
 	     * units":
 	     */
 	    const gfloat x_1 =
-	      ( (gfloat) ( ix_0 - 2 * ix_1 ) + x_0 + (gfloat) -0.5 )
-	      /
-	      (gfloat) 2.0;
+	      (gfloat) 0.5 * ( (gfloat) ( ix_0 - 2 * ix_1 ) + x_0 - (gfloat) 0.5 );
 	    const gfloat y_1 =
-	      ( (gfloat) ( iy_0 - 2 * iy_1 ) + y_0 + (gfloat) -0.5 )
-	      /
-	      (gfloat) 2.0;
+	      (gfloat) 0.5 * ( (gfloat) ( iy_0 - 2 * iy_1 ) + y_0 - (gfloat) 0.5 );
 	      
-	    /* gint I =  */
+	    /*
+	     * We want to know what 
+	     */
+	    gint i_1 =
 	    
 	    /* do */
 	    /*   { */



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