40 #ifndef __OPENFLUID_SCIENTIFIC_FLOATINGPOINT_HPP__ 41 #define __OPENFLUID_SCIENTIFIC_FLOATINGPOINT_HPP__ 61 template<
typename T1,
typename T2>
62 inline bool isCloseEnough(
const T1& A,
const T2& B,
const double& Epsilon = 0.00001)
65 return ((std::fabs(A - B)) <= (Epsilon * std::fabs(A)));
78 template<
typename T1,
typename T2>
79 inline bool isVeryClose(
const T1& A,
const T2& B,
const double& Epsilon = 0.00001)
82 return (((std::fabs(A - B)) <= (Epsilon * std::fabs(A))) && ((std::fabs(A - B)) <= (Epsilon * std::fabs(B))));
bool isVeryClose(const T1 &A, const T2 &B, const double &Epsilon=0.00001)
Definition: FloatingPoint.hpp:79
bool isCloseEnough(const T1 &A, const T2 &B, const double &Epsilon=0.00001)
Definition: FloatingPoint.hpp:62
#define OPENFLUID_DEPRECATED
Definition: deprecation.hpp:54
bool IsCloseEnough(double A, double B, double Epsilon=0.00001) OPENFLUID_DEPRECATED
Definition: FloatingPoint.hpp:91
Definition: ApplicationException.hpp:47
bool IsVeryClose(double A, double B, double Epsilon=0.00001) OPENFLUID_DEPRECATED
Definition: FloatingPoint.hpp:101