sign
sign(v) ⇒ number
Positive number produce 1, negative -1 and 0 produces 0.
Standard implementation in graphics languages such as HLSL and GLSL
Kind: global function
Returns: number - +1 if v > 0, 0 if v == 0, -1 if v < 0
| Param | Type |
|---|---|
| v | number |