quadraticBezier static method

double quadraticBezier(
  1. double t,
  2. double p0,
  3. double p1,
  4. double p2,
)

t -- interpolation weight.

p0, p1, p2 -- the starting, control and end points defining the curve.

Used internally by quadraticBezier3 and quadraticBezier.

Implementation

static double quadraticBezier(double t, double p0, double p1, double p2) {
  return quadraticBezierP0(t, p0) +
      quadraticBezierP1(t, p1) +
      quadraticBezierP2(t, p2);
}