Krotos Modules 3
Loading...
Searching...
No Matches
SmoothedFloat.cpp
Go to the documentation of this file.
1#include "SmoothedFloat.h"
2
3namespace krotos
4{
6 {
8 return m_current;
9 }
10
11 float SmoothedFloat::getTarget() const { return m_target; }
12
13 void SmoothedFloat::setTarget(int blockSize, float newTarget)
14 {
15 m_target = newTarget;
16 m_increment = (newTarget - m_current) / (float)blockSize;
17 }
18} // namespace krotos
float m_increment
Definition SmoothedFloat.h:30
float getTarget() const
gets the target value
Definition SmoothedFloat.cpp:11
float m_current
Definition SmoothedFloat.h:29
float m_target
Definition SmoothedFloat.h:28
void setTarget(int blockSize, float newTarget)
sets the target with a block size
Definition SmoothedFloat.cpp:13
float getSmoothedValue()
increments the value by the required increment and gets smootedValue
Definition SmoothedFloat.cpp:5
Definition AirAbsorptionFilter.cpp:2