fix unix build

This commit is contained in:
Brad Hefta-Gaub 2016-03-24 13:30:20 -07:00
parent 208b594ef8
commit 6eed8fb429

View file

@ -57,7 +57,8 @@ public:
void addSample(T sample) {
if (numSamples > 0) {
average = (sample * WEIGHTING) + (average * ONE_MINUS_WEIGHTING);
T lastAverage = average;
average = (sample * WEIGHTING) + (lastAverage * ONE_MINUS_WEIGHTING);
} else {
average = sample;
}