Fix nearest f32 and f64 again

This commit is contained in:
Rerumu
2022-06-28 02:03:29 -04:00
parent e6ebb222bf
commit 04d1840d2d
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ do
function nearest.f32(num)
local result = math_round(num)
if math_abs(num) % 1 == 0.5 and math_floor(math_abs(num) % 2) == 0 then
if (math_abs(num) + 0.5) % 2 == 1 then
result = result - math_sign(result)
end