Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-27 18:52:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 18:52:16 +0400
commit8d7c3f8a7e6de7625b3631cd91242fbefa98cf3a (patch)
treee839ba73dfdff4795060b63fa88c1fdecdf03b73 /source/blender/blenlib/BLI_utildefines.h
parent0b9f67061ce34e6147a013cc7025bb194c4e693e (diff)
interface: floats were being implicitly promoted to doubles, adjust to use floats (in most cases) otherwise cast to double.
Diffstat (limited to 'source/blender/blenlib/BLI_utildefines.h')
-rw-r--r--source/blender/blenlib/BLI_utildefines.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 55f227f0284..bee5c031fc9 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -125,6 +125,7 @@
#define CLAMPTEST(a, b, c) if((b)<(c)) {CLAMP(a, b, c);} else {CLAMP(a, c, b);}
#define IS_EQ(a,b) ((fabs((double)(a)-(b)) >= (double) FLT_EPSILON) ? 0 : 1)
+#define IS_EQF(a,b) ((fabsf((float)(a)-(b)) >= (float) FLT_EPSILON) ? 0 : 1)
#define IS_EQT(a, b, c) ((a > b)? (((a-b) <= c)? 1:0) : ((((b-a) <= c)? 1:0)))
#define IN_RANGE(a, b, c) ((b < c)? ((b<a && a<c)? 1:0) : ((c<a && a<b)? 1:0))