From 5607eec18bae68e4cd38ef6d1fa69d7f1d84bfc8 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:16:24 +1100 Subject: Use more `TRUNCF_BINANG` for f32 -> s16 casts (#1503) * TRUNCF_BINANG * brackets * extra cast --- src/code/z_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/code/z_lib.c') 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; -- cgit v1.2.3