transformInternal method
Returns the value of the curve at point t
.
The given parametric value t
will be between 0.0 and 1.0, inclusive.
Implementation
@override
double transformInternal(double t) {
if (_mZeta < 1) {
// Under-damped
t = math.exp(-t * _mZeta * _mW0) *
(_mA * math.cos(_mWd * t) + _mB * math.sin(_mWd * t));
} else {
// Critically damped (ignoring over-damped case for now).
t = (_mA + _mB * t) * math.exp(-t * _mW0);
}
// Map range from [1..0] to [0..1].
return 1 - t;
}