diff options
| author | Aetias <aetias@outlook.com> | 2024-10-20 16:51:14 +0200 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2024-10-20 16:51:14 +0200 |
| commit | 52e0ac185a5a3570e166ddfaddb4662863ed3d63 (patch) | |
| tree | 5c3e2ab28324e232a3a7cca148deb15894ada19a /include/lib | |
| parent | c9f8ce4b16f92f148fb4a67b270152d9e59627de (diff) | |
Decomp `ActorRupee`
Diffstat (limited to 'include/lib')
| -rw-r--r-- | include/lib/math.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/lib/math.h b/include/lib/math.h index f11bd10e..f7204acc 100644 --- a/include/lib/math.h +++ b/include/lib/math.h @@ -9,7 +9,9 @@ typedef s32 q20; typedef s16 q4; #define INT_TO_Q20(n) ((s32) ((n) << 12)) +#define FLOAT_TO_Q21(n) ((s32) (((n) * 8192 + 1) / 4)) #define FLOAT_TO_Q20(n) ((s32) (((n) * 8192 + 1) / 2)) +#define FLOAT_TO_Q19(n) ((s32) (((n) * 8192 + 1))) #define ROUND_Q20(n) (((s32) (n) + 0x800) >> 12) #define MUL_Q20(a, b) (q20)((((s64) (a)) * ((s64) (b)) + 0x800) >> 12) |
