|
FougTools
0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
|
#include <cmath>#include <limits>#include "consts.h"#include "utils_helpers.h"#include "mathtools/utils.impl.h"Go to the source code of this file.
Namespaces | |
| math | |
Enumerations | |
| enum | math::ComparisonCheckFlags { math::NoCheck = 0x1, math::InfinityCheck = 0x2, math::NanCheck = 0x4, math::SignCheck = 0x8, math::AllCheck = InfinityCheck | NanCheck | SignCheck } |
Functions | |
| template<typename T > | |
| bool | math::equalByAbsError (const T &a, const T &b, const T &tol=static_cast< T >(1e-6)) |
| template<typename T > | |
| bool | math::equalByRelError (const T &a, const T &b, const T &maxRelError=static_cast< T >(1e-5), const T &maxAbsError=std::numeric_limits< T >::epsilon()) |
| template<typename T > | |
| bool | math::equalByIntDiff (const T &a, const T &b, typename __impl::TypeTraits< T >::IntegralType_t maxDistInts=10, ComparisonCheckFlags checkFlags=NoCheck) |
| template<typename T > | |
| T | math::clamped (const T &v, const T &min, const T &max) |
| template<typename T > | |
| double | math::radianToDegree (const T &angle) |
| template<typename T > | |
| double | math::degreeToRadian (const T &angle) |
| template<typename T > | |
| int | math::sign (const T &v) |
| template<typename T > | |
| T | math::square (const T &x) |
| template<typename T > | |
| T | math::zero () |
| template<typename T > | |
| bool | math::isPositive (const T &v) |
| template<typename T > | |
| bool | math::isNegative (const T &v) |
1.8.8