![]() |
Blaze 3.9
|
Numerical epsilon value for floating point data types. More...
#include <Epsilon.h>
Public Types | |
using | NegativeType = NegativeEpsilon< Epsilon > |
The negative epsilon type. | |
Public Member Functions | |
Constructors | |
constexpr | Epsilon () |
The default constructor of the Epsilon class. | |
Epsilon (const Epsilon &)=default | |
Destructor | |
~Epsilon ()=default | |
Unary plus/minus operators | |
constexpr const Epsilon & | operator+ () const |
Returns the positive epsilon value for all floating point data types. More... | |
constexpr const NegativeType | operator- () const |
Returns the negative epsilon value for all floating point data types. More... | |
Conversion operators | |
template<typename T > | |
constexpr | operator const T () const |
Conversion operator to the required floating point data type. More... | |
Forbidden operations | |
Epsilon & | operator= (const Epsilon &)=delete |
void * | operator& () const =delete |
Numerical epsilon value for floating point data types.
The Epsilon class is a wrapper class around the functionality of the blaze::Limits class. It represents the smallest difference between two values of any floating point data type. In order to assign an epsilon value, the Epsilon class can be implicitly converted to the three built-in floating point data types float, double and long double.
In order to handle epsilon values conveniently, the global Epsilon instance blaze::epsilon is provided, which can be used wherever a floating point data type is required.
|
constexpr |
Conversion operator to the required floating point data type.
The conversion operator returns the smallest possible difference between values of the floating point data type T.
|
constexpr |
Returns the positive epsilon value for all floating point data types.
|
constexpr |
Returns the negative epsilon value for all floating point data types.