Volume Cartographer 2.27.0
|
Methods for comparing floating point numbers. More...
#include <algorithm>
#include <cmath>
#include <limits>
#include <type_traits>
Go to the source code of this file.
Namespaces | |
namespace | volcart |
Volume Cartographer library | |
Functions | |
template<typename T , std::enable_if_t< std::is_floating_point< T >::value, bool > = true> | |
auto | volcart::AlmostEqual (const T lhs, const T rhs, T epsAbs=static_cast< T >(DEFAULT_MAX_DIFFERENCE), T epsRel=std::numeric_limits< T >::epsilon()) -> bool |
Compare if two floating-point numbers are "almost equal". More... | |
Variables | |
static constexpr double | volcart::DEFAULT_MAX_DIFFERENCE = 1e-7 |
Methods for comparing floating point numbers.
Provides templated methods for floating-point comparison. Based off the algorithms described by Bruce Dawson.
Definition in file FloatComparison.hpp.