From b990ade652a2208a639db7c1e89f46236c381eea Mon Sep 17 00:00:00 2001 From: Aetias Date: Sun, 18 Feb 2024 12:12:35 +0100 Subject: [PATCH] Add parenthesis around `ROUND_Q20` macro arg --- include/lib/math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/lib/math.h b/include/lib/math.h index 5866c989..67a8b9cc 100644 --- a/include/lib/math.h +++ b/include/lib/math.h @@ -9,7 +9,7 @@ typedef u32 q20; #define INT_TO_Q20(n) ((s32)((n) << 12)) #define FLOAT_TO_Q20(n) ((s32)(((n) * 8192 + 1) / 2)) -#define ROUND_Q20(n) (((s32) n + 0x800) >> 12) +#define ROUND_Q20(n) (((s32)(n) + 0x800) >> 12) typedef struct { /* 0 */ q20 x;