Method sgn()
- Method sgn
intsgn(mixedvalue)
intsgn(mixedvalue,mixedzero)- Description
Check the sign of a value.
- Returns
Returns
-1ifvalueis less thanzero,1ifvalueis greater thanzeroand0(zero) otherwise.- See also
int sgn(mixed value)
int sgn(mixed value, mixed zero)
Check the sign of a value.
Returns -1 if value is less than zero,
1 if value is greater than zero and 0
(zero) otherwise.