47 mc_rtc::log::warning(
"Time constant must be at least twice the timestep (Nyquist–Shannon sampling theorem)");
50 cutoffPeriod_ = period;
58 void reset(
const T & value) { eval_ = value; }
67 double x = (cutoffPeriod_ <=
dt_) ? 1. :
dt_ / cutoffPeriod_;
68 eval_ = x * newValue + (1. - x) * eval_;
74 const T &
eval()
const {
return eval_; }
79 double dt()
const {
return dt_; }
96 double cutoffPeriod_ = 0.;