[gegl] color-to-alpha: Add single precision suffixes to FP literals



commit 10d940059981713085f2ad732f817bd55df8bdb3
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Aug 31 19:05:03 2011 +0530

    color-to-alpha: Add single precision suffixes to FP literals
    
    ... where applicable.

 operations/workshop/color-to-alpha.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/operations/workshop/color-to-alpha.c b/operations/workshop/color-to-alpha.c
index 94959b9..269c256 100644
--- a/operations/workshop/color-to-alpha.c
+++ b/operations/workshop/color-to-alpha.c
@@ -95,11 +95,11 @@ color_to_alpha (gfloat     *color,
       if (color[i] < 1.e-4f)
         temp[i] = src[offset+i];
       else if (src[offset+i] > color[i])
-        temp[i] = (src[offset+i] - color[i]) / (1.0 - color[i]);
+        temp[i] = (src[offset+i] - color[i]) / (1.0f - color[i]);
       else if (src[offset+i] < color[i])
         temp[i] = (color[i] - src[offset+i]) / color[i];
       else
-        temp[i] = 0.0;
+        temp[i] = 0.0f;
     }
 
   if (temp[0] > temp[1])



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