1 2 3 4 5 6 7 8 9 10 11
local function sign(x) if x > 0 then return 1 elseif x < 0 then return -1 else return 0 end end return { sign = sign, }