Home   Manual   Type Index   Symbol Index   Topics Index

std::sgn

returns the sign of its (numerical) argument

Parameters

x

Description

If the argument is less than zero then -1 is returned.

If the argument equals zero then 0 is returned.

If the argument is greater than zero then 1 is returned.

See also

std::abs   returns the absolute value of its (numerical) argument

Topics

Math