diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-05-24 07:00:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 07:00:57 -0400 |
commit | 94af15fab8e80f61326fc0427c5412e60b0d67ea (patch) | |
tree | 9542fdb55f9b183b54ec043aa9f8b2c685bbd7d1 /arm9/lib/include/fx.h | |
parent | 0b01c7d1c57c4e21fdb0069b3ac4f9c7276b3cc1 (diff) | |
parent | b4743f04e30937b19aca974bf2222de8fe3eb36e (diff) |
Merge pull request #107 from PikalaxALT/pikalax_work
Split rodata and bss
Diffstat (limited to 'arm9/lib/include/fx.h')
-rw-r--r-- | arm9/lib/include/fx.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arm9/lib/include/fx.h b/arm9/lib/include/fx.h index e0ba52f3..3df89293 100644 --- a/arm9/lib/include/fx.h +++ b/arm9/lib/include/fx.h @@ -55,6 +55,13 @@ typedef s64 fx64c; #define FX_MUL_FX32_FX64C(a, b) ((fx32)((((a) * (b) + ((fx64)1 << (FX64C_INT_SHIFT - 1))) >> FX64C_INT_SHIFT))) +#define FX_FX16_TO_F32(x) ((f32)((x) / (f32)(1 << FX16_SHIFT))) +#define FX_F32_TO_FX16(x) ((fx16)(((x) > 0) ? \ + (fx16)((x) * (1 << FX16_INT_SHIFT) + 0.5f ) : \ + (fx16)((x) * (1 << FX16_INT_SHIFT) - 0.5f ))) + +#define FX16_CONST(x) FX_F32_TO_FX16(x) + struct Vecx32 { fx32 x; |