Function pecsim::sign(double)¶
Defined in File math_utils.cc
Function Documentation¶
-
double pecsim::sign(double x)¶
Returns the sign of a number.
- Parameters:
x – the number to check
- Returns:
double 1 if x is positive, -1 if x is negative, and 0 if x is zero.