Mothback/data/scripts/math.lua

10 lines
118 B
Lua
Raw Normal View History

2021-10-16 23:06:11 +00:00
function math.sign(x)
if x<0 then
return -1
elseif x>0 then
return 1
else
return 0
end
end