summaryrefslogtreecommitdiff
path: root/arm9/lib/src/FX_atan.c
diff options
context:
space:
mode:
authorMade <made111@gmx.de>2020-05-04 17:07:22 +0200
committerMade <made111@gmx.de>2020-05-04 17:07:22 +0200
commitab28b0b37f2fd9fba6010e48e15bd31170d678d7 (patch)
treee144d94307707a51ccfe9e109c9c10c9dd0b01e7 /arm9/lib/src/FX_atan.c
parent246d8051ac7b7535c53d5d180eaf1d97451d31f2 (diff)
Add typedefs for fixed point types
Diffstat (limited to 'arm9/lib/src/FX_atan.c')
-rw-r--r--arm9/lib/src/FX_atan.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arm9/lib/src/FX_atan.c b/arm9/lib/src/FX_atan.c
index 684db81e..085763f8 100644
--- a/arm9/lib/src/FX_atan.c
+++ b/arm9/lib/src/FX_atan.c
@@ -2,15 +2,15 @@
#include "main.h"
#include "fx.h"
-extern s16 FX_AtanTable_[];
+extern fx16 FX_AtanTable_[];
-u16 FX_Atan(s32 x){
+u16 FX_Atan(fx32 x){
if (x >= 0)
{
if (x > 0x1000)
{
x = FX_Inv(x);
- s16 y = FX_AtanTable_[x >> 5];
+ fx16 y = FX_AtanTable_[x >> 5];
return 0x4000 - y;
}
else if (x < 0x1000)
@@ -27,7 +27,7 @@ u16 FX_Atan(s32 x){
if (x < -0x1000)
{
x = FX_Inv(-x);
- s16 y = FX_AtanTable_[x >> 5];
+ fx16 y = FX_AtanTable_[x >> 5];
return y - 0x4000;
}
else if (x > -0x1000)
@@ -41,8 +41,8 @@ u16 FX_Atan(s32 x){
}
}
-u16 FX_Atan2(s32 x, s32 y){
- s32 result;
+u16 FX_Atan2(fx32 x, fx32 y){
+ fx32 result;
u32 positive, bias, denominator, numerator;
if (x > 0)
{