Loading...
Searching...
No Matches
juce::Tolerance< Type > Class Template Reference

## Detailed Description

template<typename Type>
class juce::Tolerance< Type >

A class encapsulating both relative and absolute tolerances for use in floating-point comparisons.

See also
  approximatelyEqual, absoluteTolerance, relativeTolerance

The documentation for this class was generated from the following file:

- juce_core/maths/juce_MathsFunctions.h

## Public Member Functions

| Tolerance ()=default
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.
Type | getAbsolute () const
Type | getRelative () const

## Constructors and Destructors

## Tolerance()

template<typename Type>

juce::Tolerance< Type >::Tolerance | ( |  | ) |

default

Referenced by withAbsolute(), and withRelative().

## Member Functions

## withAbsolute()

template<typename Type>

Tolerance juce::Tolerance< Type >::withAbsolute | ( | Type | newAbsolute | ) |

inline nodiscard

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.

See also
  getAbsolute, absoluteTolerance

References Tolerance(), and juce::withMember().

Referenced by juce::absoluteTolerance().

## withRelative()

template<typename Type>

Tolerance juce::Tolerance< Type >::withRelative | ( | Type | newRelative | ) |

inline nodiscard

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.

See also
  getRelative, relativeTolerance

References Tolerance(), and juce::withMember().

Referenced by juce::relativeTolerance().

## getAbsolute()

template<typename Type>

Type juce::Tolerance< Type >::getAbsolute | ( |  | ) | const

inline nodiscard

## getRelative()

template<typename Type>

Type juce::Tolerance< Type >::getRelative | ( |  | ) | const

inline nodiscard

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited