transformInternal method
Override this method to define the curve's behavior.
t is guaranteed to be in the range (0.0, 1.0) exclusive.
Implementation
@override
double transformInternal(double t) {
final s = period / 4.0;
t = 2.0 * t - 1.0;
if (t < 0.0) {
return -0.5 *
math.pow(2.0, 10.0 * t).toDouble() *
math.sin((t - s) * (math.pi * 2.0) / period);
} else {
return 0.5 *
math.pow(2.0, -10.0 * t).toDouble() *
math.sin((t - s) * (math.pi * 2.0) / period) +
1.0;
}
}