Template Function ecl::nsign

Function Documentation

template<typename Scalar>
inline int ecl::nsign(const Scalar &x)

A sign function for numerical values (negative return if arg is zero).

Note that zero will return -1, positive numbers +1, and negative numbers -1.

Parameters:

x – : scalar to test.

Template Parameters:

Scalar – : some numerical quantity satisfying a comparison with >= 0

Returns:

bool : true if x is >= 0.