Documentation
›
API Reference
›
Object
›
Math
Sgn
Lua
C++
This function returns the sign of the input value.
Syntax
number
Sgn
(number f)
Parameters
f:
input value.
Returns
If the input value if less than 0.0 then -1 is returned, otherwise 1 is returned.