JUCE: Tolerance< Type > Class Template Reference

JUCE

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Tolerance< Type > Class Template Reference
juce_core » maths

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

`#include <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

## Detailed Description

template<typename Type>
class Tolerance< Type >

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

See also
  approximatelyEqual, absoluteTolerance, relativeTolerance

## Constructor & Destructor Documentation

## ◆ Tolerance()

template<typename Type >

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

## Member Function Documentation

## ◆ withAbsolute()

template<typename Type >

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

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 withMember().

## ◆ withRelative()

template<typename Type >

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

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 withMember().

## ◆ getAbsolute()

template<typename Type >

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

## ◆ getRelative()

template<typename Type >

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

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

- juce_MathsFunctions.h