summaryrefslogtreecommitdiff
path: root/src/code/z_lib.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-12-13 15:16:24 +1100
committerGitHub <noreply@github.com>2023-12-13 15:16:24 +1100
commit5607eec18bae68e4cd38ef6d1fa69d7f1d84bfc8 (patch)
treebb13ad49718f8883bc65d7bd0a9db4d791800cf2 /src/code/z_lib.c
parented4da0ecef698ad0112c7cdf575368ac3c61903b (diff)
Use more `TRUNCF_BINANG` for f32 -> s16 casts (#1503)
* TRUNCF_BINANG * brackets * extra cast
Diffstat (limited to 'src/code/z_lib.c')
-rw-r--r--src/code/z_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/code/z_lib.c b/src/code/z_lib.c
index 0d4d00626..00bb37bc8 100644
--- a/src/code/z_lib.c
+++ b/src/code/z_lib.c
@@ -76,7 +76,7 @@ s32 Math_ScaledStepToS(s16* pValue, s16 target, s16 step) {
step = -step;
}
- *pValue += (s16)(step * f0);
+ *pValue += TRUNCF_BINANG(step * f0);
if (((s16)(*pValue - target) * step) >= 0) {
*pValue = target;