sign(Decimal)
Returns the sign of the given number. When the sign of the argument is positive, 1 is returned. When the sign of the argument is negative, -1 is returned. If the argument is 0, 0 is returned.
Examples:
sign(-7)
= -1
sign(0)
= 0
sign(13)
= 1
Argument type | Result |
---|---|
|
|
|
|
|
|
Other Value |
|