![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This file contains a collection of methods comparing, manipulating, etc.
floating point numbers (i.e. floats and doubles).
#include "colony_config.h"#include <cmath>#include <cfloat>Go to the source code of this file.
Namespaces | |
| namespace | Cpl |
| The 'Cpl' namespace is the root name space for the Colony. | |
| namespace | Cpl::Math |
| The Math namespace provides classes, utilities, etc. | |
Macros | |
| #define | CPL_MATH_REAL_FLOAT_EPSILON (FLT_EPSILON) |
| This symbols provides the default Epsilon value when testing for 'almost equal' between to float numbers. | |
| #define | CPL_MATH_REAL_DOUBLE_EPSILON (DBL_EPSILON) |
| This symbols provides the default Epsilon value when testing for 'almost equal' between to double numbers. | |
Functions | |
| template<class T > | |
| bool | Cpl::Math::almostEquals (T a, T b, T epsilon) |
| This template function implements a 'almost equals' comparison function for floating points numbers. | |
| bool | Cpl::Math::areFloatsEqual (float a, float b, float epsilon=CPL_MATH_REAL_FLOAT_EPSILON) |
| This method is short hand for almostEquals<float> AND provides a default epsilon. | |
| bool | Cpl::Math::areDoublesEqual (double a, double b, double epsilon=CPL_MATH_REAL_DOUBLE_EPSILON) |
| This method is short hand for almostEquals<double> AND provides a default epsilon. | |
| #define CPL_MATH_REAL_DOUBLE_EPSILON (DBL_EPSILON) |
This symbols provides the default Epsilon value when testing for 'almost equal' between to double numbers.
Note: This is a GLOBAL setting.
| #define CPL_MATH_REAL_FLOAT_EPSILON (FLT_EPSILON) |
This symbols provides the default Epsilon value when testing for 'almost equal' between to float numbers.
Note: This is a GLOBAL setting.