Six crescent shaped legs

Dependencies:   mbed

LerpSmoother.cpp

Committer:
sim642
Date:
2016-06-21
Revision:
47:4f418a4b0051
Parent:
12:8de7f5d56fe4

File content as of revision 47:4f418a4b0051:

#include "LerpSmoother.hpp"

LerpSmoother::LerpSmoother(float nFactor) :
    factor(nFactor),
    prevValue(0.f)
{
    
}

float LerpSmoother::smooth(float value)
{
    return prevValue = (1.f - factor) * prevValue + factor * value;
}