32 return start_ < t && t < start_ + duration_;
42 scalar
sign = t1 < t2 ? +1 : -1;
44 const scalar tL =
min(t1, t2);
45 const scalar tR =
max(t1, t2);
47 const scalar tLStar =
min(
max(tL, start_), tR);
48 const scalar tRStar =
max(
min(tR, start_ + duration_), tL);
50 return sign*(tRStar - tLStar);
virtual scalar value(const scalar t) const
Return value for time t.
virtual scalar integral(const scalar t1, const scalar t2) const
Return the integral between times t1 and t2.
dimensionedScalar sign(const dimensionedScalar &ds)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)