INNER CODE UNIT · Dart
YCompressionCurve
haucky/drawing_animation · lib/src/curves.dart:4
class YCompressionCurve extends Curve {
YCompressionCurve(this.a, this.b) {
assert(b >= b);
}
//for bounded curves
final double total = 1.0;
//lower bound
final double a;
//upper bound
final double b;
@override
double transform(double t) => t * (b - a) / total + a;
}