From c813602947fc0667a3fc4fa5bdae0df8bb686d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Mon, 14 Oct 2019 01:08:38 +0200 Subject: [PATCH] Add parentheses --- raycastlib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raycastlib.h b/raycastlib.h index bc9906a..26f5cbc 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -154,8 +154,8 @@ #define RCL_min(a,b) ((a) < (b) ? (a) : (b)) #define RCL_max(a,b) ((a) > (b) ? (a) : (b)) -#define RCL_nonZero(v) (v + (v == 0)) ///< To prevent zero divisions. -#define RCL_zeroClamp(x) (x * (x >= 0)) +#define RCL_nonZero(v) ((v) + ((v) == 0)) ///< To prevent zero divisions. +#define RCL_zeroClamp(x) ((x) * ((x) >= 0)) #define RCL_likely(cond) __builtin_expect(!!(cond),1) #define RCL_unlikely(cond) __builtin_expect(!!(cond),0)