make static method

CubicEase make(
  1. double x1,
  2. double y1,
  3. double x2,
  4. double y2,
)

Implementation

static CubicEase make(double x1, double y1, double x2, double y2) {
  if (x1 == y1 && x2 == y2) {
    return LinearCubicEase();
  } else {
    return Cubic(x1, y1, x2, y2);
  }
}