add math.sign

This commit is contained in:
MihailRis 2026-07-21 22:41:03 +03:00
parent a0b7e81a94
commit a1a5d390c4

View file

@ -35,3 +35,7 @@ function math.sum(...)
return sum
end
function math.sign(x)
return (x > 0) and 1 or (x < 0 and -1 or 0)
end