| Mozzi version v1.1.0 sound synthesis library for Arduino |

Public Member Functions | List of all members
AutoRange< T > Class Template Reference

Keeps a running calculation of the range of the input values it receives. More...

`#include <AutoRange.h>`

## Public Member Functions
| AutoRange (T min_expected, T max_expected)
| Constructor. More...
void | next (T n)
| Updates the current range. More...
T | getMin ()
| Returns the current minimum. More...
T | getMax ()
| Returns the current maximum. More...
T | getRange ()
| Returns the current range. More...

## Detailed Description

### template<class T>
class AutoRange< T >

Keeps a running calculation of the range of the input values it receives.

Definition at line 18 of file AutoRange.h.

## Constructor & Destructor Documentation

## ◆ AutoRange()

template<class T>

AutoRange< T >::AutoRange | ( | T | min_expected,
|  | T | max_expected
| ) |  |
| inline

Constructor.

Template Parameters

  T | the type of numbers to to use, eg. int, unsigned int, float etc.

Parameters

  min_expected | the minimum possible input value.
  max_expected | the maximum possible input value.

Definition at line 27 of file AutoRange.h.

## Member Function Documentation

## ◆ getMax()

template<class T>

T AutoRange< T >::getMax | ( |  | ) |
| inline

Returns the current maximum.

Returns
  maximum

Definition at line 64 of file AutoRange.h.

## ◆ getMin()

template<class T>

T AutoRange< T >::getMin | ( |  | ) |
| inline

Returns the current minimum.

Returns
  minimum

Definition at line 55 of file AutoRange.h.

## ◆ getRange()

template<class T>

T AutoRange< T >::getRange | ( |  | ) |
| inline

Returns the current range.

Returns
  range

Definition at line 73 of file AutoRange.h.

## ◆ next()

template<class T>

void AutoRange< T >::next | ( | T | n | ) |
| inline

Updates the current range.

Parameters

  n | the next value to include in the range calculation.

Definition at line 35 of file AutoRange.h.