A class encapsulating both relative and absolute tolerances for use in floating-point comparisons. More...
#include <juce_MathsFunctions.h>

Public Member Functions | |
| Tolerance ()=default | |
| Type | getAbsolute () const |
| Type | getRelative () const |
| Tolerance | withAbsolute (Type newAbsolute) |
| Returns a copy of this Tolerance object with a new absolute tolerance. | |
| Tolerance | withRelative (Type newRelative) |
| Returns a copy of this Tolerance object with a new relative tolerance. | |
Private Attributes | |
| Type | absolute {} |
| Type | relative {} |
A class encapsulating both relative and absolute tolerances for use in floating-point comparisons.
@tags{Core}
|
default |
|
inline |
References juce::Tolerance< Type >::absolute.
|
inline |
References juce::Tolerance< Type >::relative.
|
inline |
Returns a copy of this Tolerance object with a new absolute tolerance.
If you just need a Tolerance object with an absolute tolerance, it might be worth using the absoluteTolerance() function.
References juce::Tolerance< Type >::absolute, and juce::withMember().
Referenced by juce::absoluteTolerance().
|
inline |
Returns a copy of this Tolerance object with a new relative tolerance.
If you just need a Tolerance object with a relative tolerance, it might be worth using the relativeTolerance() function.
References juce::Tolerance< Type >::relative, and juce::withMember().
Referenced by juce::relativeTolerance().
|
private |
Referenced by juce::Tolerance< Type >::getAbsolute(), and juce::Tolerance< Type >::withAbsolute().
|
private |
Referenced by juce::Tolerance< Type >::getRelative(), and juce::Tolerance< Type >::withRelative().