[librsvg] rsvg-filter: Use fabs() instead of abs() for floats



commit 28982201975343028d1610f36ebe839b4497a420
Author: Philip Withnall <withnall endlessm com>
Date:   Thu Nov 30 10:41:22 2017 +0000

    rsvg-filter: Use fabs() instead of abs() for floats
    
    Fixes a compiler warning (-Wabsolute-value).
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=791017

 rsvg-filter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 07f8d59..0773fce 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -972,7 +972,7 @@ rsvg_filter_blend (RsvgFilterPrimitiveBlendMode mode,
                     cr = bca + bcb - 2 * bca * bcb;
                     break;
                 case difference:
-                    cr = abs (bca - bcb);
+                    cr = fabs (bca - bcb);
                     break;
                 }
                 cr *= 255.0;


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