summaryrefslogtreecommitdiff
path: root/src/code/z_lib.c
diff options
context:
space:
mode:
authormzxrules <mzxrules@gmail.com>2022-11-07 19:21:51 -0500
committerGitHub <noreply@github.com>2022-11-07 21:21:51 -0300
commit577a4a772b487b68f0c655d5954fdbd26df04e37 (patch)
treea54f80dd7ebb72a402ed026bdc6f06cdfd273d78 /src/code/z_lib.c
parent65cf949bc04f71c93a8f7f3862339e1f1cac7337 (diff)
Fix last two functions in sys_math_atan (#1066)
* Fix extra Atan2 funcs * format * make Math_GetAtan2Tbl private * rename Depr to XY * ./format.sh i loathe thee * namefixer.py changes
Diffstat (limited to 'src/code/z_lib.c')
-rw-r--r--src/code/z_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/code/z_lib.c b/src/code/z_lib.c
index 6466b337c..136918765 100644
--- a/src/code/z_lib.c
+++ b/src/code/z_lib.c
@@ -251,7 +251,7 @@ void func_800FF3A0(f32* distOut, s16* angleOut, Input* input) {
if (dist > 0.0f) {
x = input->cur.stick_x;
y = input->cur.stick_y;
- *angleOut = Math_FAtan2F(y, -x);
+ *angleOut = Math_Atan2S_XY(y, -x);
} else {
*angleOut = 0;
}
@@ -420,11 +420,11 @@ f32 Math_Vec3f_DiffY(Vec3f* a, Vec3f* b) {
s16 Math_Vec3f_Yaw(Vec3f* a, Vec3f* b) {
f32 f14 = b->x - a->x;
f32 f12 = b->z - a->z;
- return Math_FAtan2F(f12, f14);
+ return Math_Atan2S_XY(f12, f14);
}
s16 Math_Vec3f_Pitch(Vec3f* a, Vec3f* b) {
- return Math_FAtan2F(Math_Vec3f_DistXZ(a, b), a->y - b->y);
+ return Math_Atan2S_XY(Math_Vec3f_DistXZ(a, b), a->y - b->y);
}
void IChain_Apply_u8(u8* ptr, InitChainEntry* ichain);