NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
char sign ( variant  num)
inline

Sign value.

Return the sign of the value argument (-1, 0, or 1). Any scalar type can be passed into this function.

Parameters
numThe numeric value for which to calculate its sign value.
Returns
-1 if the parameter is negative, 0 if the parameter is zero, or 1 if the parameter is positive.
Examples:
ex_sign.nxc.