Template Function squiggles::sgn

Function Documentation

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

Returns the sign value of the given value.

Return

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