diff --git a/codegen/luajit/runtime/runtime.lua b/codegen/luajit/runtime/runtime.lua index 5a34df8..f0a3f25 100644 --- a/codegen/luajit/runtime/runtime.lua +++ b/codegen/luajit/runtime/runtime.lua @@ -113,7 +113,7 @@ do function nearest.f32(num) local result = round(num) - if math_abs(num) % 1 == 0.5 and temp_2 % 2 == 1 then + if math_abs(num) % 1 == 0.5 and result % 2 == 1 then result = result - 1 end