Fuzzy math operators. More...
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <ecl/type_traits/numeric_limits.hpp>
Go to the source code of this file.
Namespaces | |
ecl | |
Embedded control libraries. | |
Functions | |
template<typename Scalar , typename OtherScalar > | |
bool | ecl::isApprox (const Scalar &x, const OtherScalar &y, typename numeric_limits< Scalar >::Precision precision=numeric_limits< Scalar >::dummy_precision) |
Checks if two values are approximate. More... | |
template<typename Scalar , typename OtherScalar > | |
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. More... | |
Fuzzy math operators.
Not really fuzzy math, but simple operators for when values are close to the real deal. This could probably use an epsilon-approximate operator as well.
Definition in file fuzzy.hpp.