Scythe-1.0.3
template<class T >
T scythe::sgn ( const T &  x) [inline]

Determine the sign of a number.

This function compares x to (T) 0, returning (T) 1 if x is greater than zero, (T) -1 if x is less than zero, and (T) 0 otherwise.

Parameters:
xThe value to check.

Referenced by scythe::rng< mersenne >::rnchypgeom().