From 2a65acc952205aaa1ac950d4ee46373a0c4df329 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 3 Feb 2016 21:17:07 +1100 Subject: Cleanup: parenthesize macros --- source/blender/blenlib/BLI_utildefines.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenlib/BLI_utildefines.h') diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 617634bb182..d504e503c68 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -406,9 +406,9 @@ extern "C" { CHECK_TYPE_INLINE(a, float), CHECK_TYPE_INLINE(b, float), \ ((fabsf((float)((a) - (b))) >= (float) FLT_EPSILON) ? false : true)) -#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)) -#define IN_RANGE_INCL(a, b, c) ((b < c) ? ((b <= a && a <= c) ? 1 : 0) : ((c <= a && a <= b) ? 1 : 0)) +#define IS_EQT(a, b, c) (((a) > (b)) ? ((((a) - (b)) <= (c))) : (((((b) - (a)) <= (c))))) +#define IN_RANGE(a, b, c) (((b) < (c)) ? (((b) < (a) && (a) < (c))) : (((c) < (a) && (a) < (b)))) +#define IN_RANGE_INCL(a, b, c) (((b) < (c)) ? (((b) <= (a) && (a) <= (c))) : (((c) <= (a) && (a) <= (b)))) /* unpack vector for args */ #define UNPACK2(a) ((a)[0]), ((a)[1]) -- cgit v1.2.3