diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index e5a76f4bd..fce83c791 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -250,7 +250,7 @@ end --- @param x number --- Rounds `x` to the nearest integer value function math.round(x) - return x > 0 and math.floor(x + 0.5) or math.ceil(x - 0.5) + return x > 0 and __math_floor(x + 0.5) or __math_ceil(x - 0.5) end diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 3dc057865..fd4bdec2c 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -222,7 +222,7 @@ char gSmluaConstants[] = "" "--- @param x number\n" "--- Rounds `x` to the nearest integer value\n" "function math.round(x)\n" -"return x > 0 and math.floor(x + 0.5) or math.ceil(x - 0.5)\n" +"return x > 0 and __math_floor(x + 0.5) or __math_ceil(x - 0.5)\n" "end\n" "--- @type integer\n" "FONT_TINY = -1\n"