13 template <
typename Type>
26 approx.setEpsilon(epsilon);
52 stream <<
"~" <<
approx.value <<
" (eps = " <<
approx.epsilon <<
")";
58 template <
typename Type>
INLINE bool almostEqual(const AffineMatrix &m1, const AffineMatrix &m2, const Float eps=EPS)
Approx< Type > approx(const Type &value, const Float eps=EPS)
We have to wait till c++17 for type deduction in constructors ...
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
Symmetric traceless 2nd order tensor.
This is more or less stolen from Catch unit-testing framework.
INLINE Approx(const Type value)
INLINE Approx & setEpsilon(const Float newEps)
friend std::ostream & operator<<(std::ostream &stream, const Approx &approx)
INLINE Approx operator()(const Type &value)
INLINE friend bool operator!=(const Approx &lhs, const Type &rhs)
INLINE friend bool operator==(const Approx &lhs, const Type &rhs)
INLINE friend bool operator!=(const Type &lhs, const Approx &rhs)
INLINE friend bool operator==(const Type &lhs, const Approx &rhs)