Use more TRUNCF_BINANG for f32 -> s16 casts (#1503)

* TRUNCF_BINANG

* brackets

* extra cast
This commit is contained in:
engineer124
2023-12-13 15:16:24 +11:00
committed by GitHub
parent ed4da0ecef
commit 5607eec18b
127 changed files with 387 additions and 373 deletions
+1 -1
View File
@@ -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;