Sign
Revision as of 16:06, 17 March 2020 by 71.226.33.30 (talk)
sign
returns -1 for negative numbers, 1 for positive numbers, and 0 for zero.
Arguments
Parameter Name | Default Value | Meaning |
---|---|---|
x | number | number to get the sign of |
Example
sign(-42.6) // returns -1