Helper class used for calculating approximate moving averages that emphasize most recent samples and use exponential decay. The main benefit of this approach is (besides favoring most recent values over older ones) is that amount of state kept is minimal: simply a single average value.
Calculation is done by simple: 'avgN+1 = (p * newSample) + (1.0 - p) * avgN' formula; where 'p' is '1/len' and 'len' is the length of sample window chosen when constructing instance.
NOTE: samples are assumed to be all positive or all positive (that is; should not mix both negative and positive numbers). This matters with truncation; otherwise calculations should work even with mixed values.