Template Function ecl::isApproxOrLessThan

Function Documentation

template<typename Scalar, typename OtherScalar>
inline bool ecl::isApproxOrLessThan(const Scalar &x, const OtherScalar &y, typename numeric_limits<Scalar>::Precision precision = numeric_limits<Scalar>::dummy_precision)

Checks if the first value is less than or approximate to the second.

Note that this does not use the usual direct epsilon bound check, instead, it uses the magnitudes of the values and supplied precision to determine the epsilon bounds before carrying out the operation.

Parameters
  • x – - first input argument

  • y – - second input argument

  • precision – - precision to use (default is defined by the type).

Returns

bool : true or false of the operation.