21 #ifndef SPECTMORPH_LINEAR_SMOOTH_HH
22 #define SPECTMORPH_LINEAR_SMOOTH_HH
30 float linear_value_ = 0;
31 float linear_step_ = 0;
32 uint total_steps_ = 1;
36 reset (uint rate,
float time)
38 total_steps_ = std::max<int> (rate * time, 1);
41 set (
float new_value,
bool now =
false)
48 else if (new_value != value_)
51 linear_value_ = value_;
53 linear_step_ = (new_value - linear_value_) / total_steps_;
54 steps_ = total_steps_;
66 linear_value_ += linear_step_;
Definition: smlinearsmooth.hh:28