Signature
stock xs_sign(num){ return(num < 0) ? -1 : ((num == 0) ? 0 : 1);}
Description
Gets the sign of a value.
Parameters
- num — Number to get the sign from.
Returns
-1 if the number is negative,
0 if the number is equal to 0,
1 if the number is positive.