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... | |
Keeps a running calculation of the range of the input values it receives.
Definition at line 18 of file AutoRange.h.
Constructor.
| T | the type of numbers to to use, eg. int, unsigned int, float etc. |
| min_expected | the minimum possible input value. |
| max_expected | the maximum possible input value. |
Definition at line 27 of file AutoRange.h.
|
inline |
|
inline |
|
inline |
|
inline |
Updates the current range.
| n | the next value to include in the range calculation. |
Definition at line 34 of file AutoRange.h.