diff options
Diffstat (limited to 'include/lib')
| -rw-r--r-- | include/lib/math.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/lib/math.h b/include/lib/math.h index 67a8b9cc..86c483a0 100644 --- a/include/lib/math.h +++ b/include/lib/math.h @@ -4,7 +4,9 @@ #include "types.h" // Q20.12 fixed point number -typedef u32 q20; +typedef s32 q20; +// Q4.12 fixed point number +typedef s16 q4; #define INT_TO_Q20(n) ((s32)((n) << 12)) #define FLOAT_TO_Q20(n) ((s32)(((n) * 8192 + 1) / 2)) |
