cubicBezier static method

double cubicBezier(
  1. double t,
  2. double p0,
  3. double p1,
  4. double p2,
  5. double p3,
)

t -- interpolation weight.

p0, p1, p2, p3 -- the starting, control(twice) and end points defining the curve.

Used internally by CubicBezierCurve3 and CubicBezierCurve.

Implementation

static double cubicBezier(double t, double p0, double p1, double p2, double p3) {
  return cubicBezierP0(t, p0) +
      cubicBezierP1(t, p1) +
      cubicBezierP2(t, p2) +
      cubicBezierP3(t, p3);
}