| @@ -59,7 +59,6 @@ public: | |||||
| countdown = 0; | countdown = 0; | ||||
| } | } | ||||
| //============================================================================== | |||||
| /** Set a new target value. */ | /** Set a new target value. */ | ||||
| void setValue (FloatType newValue) noexcept | void setValue (FloatType newValue) noexcept | ||||
| { | { | ||||
| @@ -75,7 +74,6 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| //============================================================================== | |||||
| /** Compute the next value. */ | /** Compute the next value. */ | ||||
| FloatType getNextValue() noexcept | FloatType getNextValue() noexcept | ||||
| { | { | ||||
| @@ -87,6 +85,18 @@ public: | |||||
| return currentValue; | return currentValue; | ||||
| } | } | ||||
| /** Returns true if the current value is currently being interpolated. */ | |||||
| bool isSmoothing() const noexcept | |||||
| { | |||||
| return countdown > 0; | |||||
| } | |||||
| /** Returns the target value towards which the smoothed value is currently moving. */ | |||||
| FloatType getTargetValue() const noexcept | |||||
| { | |||||
| return target; | |||||
| } | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| FloatType currentValue, target, step; | FloatType currentValue, target, step; | ||||