diff --git a/sonic-radiance.love/birb/utils/math.lua b/sonic-radiance.love/birb/utils/math.lua index e8f884d..0cf8e15 100644 --- a/sonic-radiance.love/birb/utils/math.lua +++ b/sonic-radiance.love/birb/utils/math.lua @@ -94,6 +94,8 @@ function Math.pointDirection(x1,y1,x2,y2) local vecx, vecy, angle vecy = y2 - y1 vecx = x2 - x1 + -- We disable diagnostic to this line as we use LuaJIT 2.0 + ---@diagnostic disable-next-line: deprecated angle = math.atan2(-vecy, vecx) return angle @@ -140,11 +142,11 @@ function Math.numberToString(x, length) local length = length or 1 local string = "" local x = x - if (x >= math.pow(10, length)) then + if (x >= (10 ^ length)) then string = string .. x else for i=1, (length-1) do - if (x < math.pow(10, length-i)) then + if (x < (10 ^ (length-i))) then string = string .. "0" end end