43 ? (t - t0_) * frequency_->value(t)
44 : (t - t0_) / (period_->value(t) + VSMALL)
56 * (amplitude_ ? amplitude_->value(t) : 1.0)
68 * (amplitude_ ? amplitude_->value(t) : 1.0)
81 const scalar cyc = this->cycle(t);
86 ((cyc - std::floor(cyc)) < posFrac ? 1.0 : -1.0)
87 * (amplitude_ ? amplitude_->value(t) : 1.0)
97 cosForm(t) * scale_->value(t) + level_->value(t)
107 sinForm(t) * scale_->value(t) + level_->value(t)
121 squareForm(t, posFrac) * scale_->value(t) + level_->value(t)
Type sinValue(const scalar t) const
Return value for time t, using sin form.
scalar squareForm(const scalar t, const scalar posFrac) const
Calculated square value at time t.
dimensionedScalar cos(const dimensionedScalar &ds)
constexpr scalar twoPi(2 *M_PI)
scalar cycle(const scalar t) const
The cycle: (freq * time) or (time / period)
dimensionedScalar sin(const dimensionedScalar &ds)
scalar cosForm(const scalar t) const
Calculated cos value at time t.
Type squareValue(const scalar t, const scalar posFrac) const
Return value for time t, using square form.
Type cosValue(const scalar t) const
Return value for time t, using cos form.
scalar sinForm(const scalar t) const
Calculated sin value at time t.