summaryrefslogtreecommitdiff
path: root/src/code/sys_math.c
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2024-06-03 11:33:03 -0700
committerGitHub <noreply@github.com>2024-06-03 14:33:03 -0400
commitf26e77ba4088f20e72e13409f9ad535039abd291 (patch)
treefa39e6c8bb57bfe5729854c8ea2bd3e25ea4155f /src/code/sys_math.c
parent312b65d5e34878df4b70d8b9922e1082213b3662 (diff)
More General Cleanup (#1638)
* LINKER_FILES in makefile * COLPOLY_GET_NORMAL * math header * libc * M_PI for cosf and sinf files * MAXFLOAT * Revert "MAXFLOAT" This reverts commit 96b75ffaa89b1a4ca1c08278b28bc3c70224701a. * Remove SHT_MINV * SHRT_MAX * Add M_PI * Angle macros * f suffix * Format
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 99d13c332..9649218b1 100644
--- a/src/code/sys_math.c
+++ b/src/code/sys_math.c
@@ -71,7 +71,7 @@ f32 Math_PowF(f32 base, s32 exp) {
* @remark original name: "sinf_table"
*/
f32 Math_SinF(f32 rad) {
- return sins(RAD_TO_BINANG(rad)) * SHT_MINV;
+ return sins(RAD_TO_BINANG(rad)) * (1.0f / SHRT_MAX);
}
/**
@@ -80,7 +80,7 @@ f32 Math_SinF(f32 rad) {
* @remark original name: "cosf_table"
*/
f32 Math_CosF(f32 rad) {
- return coss(RAD_TO_BINANG(rad)) * SHT_MINV;
+ return coss(RAD_TO_BINANG(rad)) * (1.0f / SHRT_MAX);
}
/**