I've used this in other languages, but lua seems to be lacking this rather useful function.
Could one of you nice chappies provide me a lua function to get the sign of the number passed to it?
function math.sign(x)
if x<0 then
return -1
elseif x>0 then
return 1
else
return 0
end
end