SPC  Version 0.9.5
 All Files Functions Groups Pages
char sign ( int  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.spc.