8#define APPROX_THRESHOLD 0.01
20 template<
typename A,
typename B,
typename T>
inline bool is_approx(A a, B b, T threshold) {
21 return fabs(a - b) < threshold;
25 template<
typename A,
typename B>
inline bool is_approx(A a, B b) {
#define APPROX_THRESHOLD
Definition Math.hpp:8
Numeric comparison utilities.
Definition Math.hpp:11
bool collinear(types::Vector< T > const &a, types::Vector< T > const &b)
Check whether two vectors are collinear (parallel or anti-parallel).
Definition Math.hpp:43
bool is_module_approx(A a, B b)
Check whether the absolute values of two scalars are approximately equal.
Definition Math.hpp:32
bool is_approx(A a, B b, T threshold)
Check whether two scalars are approximately equal.
Definition Math.hpp:20
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
Generic dynamic-size column vector.
Definition Types.hpp:35