Template Function squiggles::sgn

Function Documentation

template<class T>
inline int squiggles::sgn(T v)

Returns the sign value of the given value.

Returns

1 if the value is positive, -1 if the value is negative, and 0 if the value is 0.