Cubic constructor

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

Implementation

Cubic(this.x1, this.y1, this.x2, this.y2) {
  // Precompute values table
  for (int i = 0; i < splineTableSize; ++i) {
    _values[i] = calcBezier(i * sampleStepSize, x1, x2);
  }
}