Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]

Method sgn()


Method sgn

int sgn(mixed value)
int sgn(mixed value, mixed zero)

Description

Check the sign of a value.

Returns

Returns -1 if value is less than zero , 1 if value is greater than zero and 0 (zero) otherwise.

See also

abs()