#include <Averager.hpp>
Public Member Functions | |
Averager (const int &max_count) | |
float | add (const float &value) |
int | length () |
Keeps a running average with limited history.
bites::Averager::Averager | ( | const int & | max_count | ) |
The constructor initializes the averager with maximum number of (latest) samples to keep.
float bites::Averager::add | ( | const float & | value | ) |
Add a value, and return current average.
int bites::Averager::length | ( | ) |
Return number of samples.