diff options
| author | Aetias <aetias@outlook.com> | 2024-02-18 12:12:35 +0100 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2024-02-18 12:12:35 +0100 |
| commit | b990ade652a2208a639db7c1e89f46236c381eea (patch) | |
| tree | a0c24816aa0f71c09f7afe6b02de37a072d8eba3 /include/lib | |
| parent | 7749c59b13f7b6789e5506add289e46d7c0a4494 (diff) | |
Add parenthesis around `ROUND_Q20` macro arg
Diffstat (limited to 'include/lib')
| -rw-r--r-- | include/lib/math.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
