point method

Offset point(
  1. double t
)

Calculates point on curve at given t. t - 0 to 1. Returns location on Curve at t.

Implementation

Offset point(double t) {
  final rt = 1.0 - t;
  return (start * rt * rt * rt) +
      (cpStart * 3.0 * rt * rt * t) +
      (cpEnd * 3.0 * rt * t * t) +
      (end * t * t * t);
}