summaryrefslogtreecommitdiff
path: root/src/code/sys_math.c
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2022-04-03 20:32:18 +0200
committerGitHub <noreply@github.com>2022-04-03 14:32:18 -0400
commit3ce701cfd8b1fb73270048f46389bcae83793ef3 (patch)
tree5e215128001433615aa907c19f9e7ea06008e0dc /src/code/sys_math.c
parent791d9018c09925138b9f830f7ae8142119905c05 (diff)
Angle cleanup - miscellaneous (#1159)
* Add `BINANG_TO_RAD_ALT2` * Few hex constants in place of decimal cardinal angles * Use `BINANG_TO_DEGF` more * Use `DEG_TO_RAD(int)` for angle literals * `BINANG_TO_RAD_ALT(literal)` -> use `BINANG_TO_RAD` * Somewhat arbitrary literal angles cleanup
Diffstat (limited to 'src/code/sys_math.c')
-rw-r--r--src/code/sys_math.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/code/sys_math.c b/src/code/sys_math.c
index 9e65cdaa3..0a85d5cf6 100644
--- a/src/code/sys_math.c
+++ b/src/code/sys_math.c
@@ -39,9 +39,9 @@ f32 Math_PowF(f32 base, s32 exp) {
}
f32 Math_SinF(f32 angle) {
- return sins((s16)(angle * (32767.0f / M_PI))) * SHT_MINV;
+ return sins((s16)(angle * (0x7FFF / M_PI))) * SHT_MINV;
}
f32 Math_CosF(f32 angle) {
- return coss((s16)(angle * (32767.0f / M_PI))) * SHT_MINV;
+ return coss((s16)(angle * (0x7FFF / M_PI))) * SHT_MINV;
}