[gegl] lens-flare: performance, use hypotf instead of hypot



commit 279786fac24511a67c2e9e8bc29739511259672a
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Aug 14 22:41:50 2017 +0200

    lens-flare: performance, use hypotf instead of hypot

 operations/common/lens-flare.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/operations/common/lens-flare.c b/operations/common/lens-flare.c
index 38e6d52..83c93b2 100644
--- a/operations/common/lens-flare.c
+++ b/operations/common/lens-flare.c
@@ -377,8 +377,8 @@ process (GeglOperation       *operation,
           for (b = 0; b < 3; b++)
             pixel[b] = input[idx + b];
 
-          hyp = hypot (x + roi->x - params->center_x,
-                       y + roi->y - params->center_y);
+          hyp = hypotf (x + roi->x - params->center_x,
+                        y + roi->y - params->center_y);
 
           /* center color */
           procent = params->color_size - hyp;
@@ -425,8 +425,8 @@ process (GeglOperation       *operation,
           for (i = 0; i < NUMREF; i++)
             {
               Reflect r = params->ref[i];
-              gdouble hyp = hypot (x + roi->x - r.xp,
-                                   y + roi->y - r.yp);
+              gfloat  hyp = hypotf (x + roi->x - r.xp,
+                                    y + roi->y - r.yp);
               switch (r.type)
                 {
                   case 1:


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