Cubic.straightLine constructor

Cubic.straightLine(
  1. double x0,
  2. double y0,
  3. double x1,
  4. double y1,
)

Implementation

factory straightLine(double x0, double y0, double x1, double y1) => .from(
  x0,
  y0,
  interpolateDouble(x0, x1, 1.0 / 3.0),
  interpolateDouble(y0, y1, 1.0 / 3.0),
  interpolateDouble(x0, x1, 2.0 / 3.0),
  interpolateDouble(y0, y1, 2.0 / 3.0),
  x1,
  y1,
);