From a69a5a1796d5aafe5c45167bca43769562b70dd0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 7 Sep 2014 23:01:54 -0400 Subject: [PATCH] add dblequal() util function to be used for addressing the infinite comparison warnings --- src/bin/e_utils.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bin/e_utils.h b/src/bin/e_utils.h index ae5d8bc6f..39c1a7115 100644 --- a/src/bin/e_utils.h +++ b/src/bin/e_utils.h @@ -93,5 +93,11 @@ isedje(const Evas_Object *obj) return obj && !e_util_strcmp(evas_object_type_get(obj), "edje"); } +static inline Eina_Bool +dblequal(double a, double b) +{ + return fabs(a - b) < DBL_EPSILON; +} + #endif #endif