Template Function ecl::sign

Function Documentation

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

A sign function for numerical values.

Note that zero will return zero, 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.