Six crescent shaped legs

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LerpSmoother.cpp Source File

LerpSmoother.cpp

00001 #include "LerpSmoother.hpp"
00002 
00003 LerpSmoother::LerpSmoother(float nFactor) :
00004     factor(nFactor),
00005     prevValue(0.f)
00006 {
00007     
00008 }
00009 
00010 float LerpSmoother::smooth(float value)
00011 {
00012     return prevValue = (1.f - factor) * prevValue + factor * value;
00013 }