diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-02-03 13:17:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-02-03 13:17:07 +0300 |
commit | 2a65acc952205aaa1ac950d4ee46373a0c4df329 (patch) | |
tree | 9483d45329dd023dc048b1c481acd4e2f6ab75b1 /source/blender/blenlib/BLI_utildefines.h | |
parent | 9ab7482657aa6a5b968c894be37a2d16aa301293 (diff) |
Cleanup: parenthesize macros
Diffstat (limited to 'source/blender/blenlib/BLI_utildefines.h')
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 6 |
1 files changed, 3 insertions, 3 deletions
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]) |