position method
Implementation
@override
double position(final double distance) {
GValidate.inclusiveBetween(
0, 1, distance, "Distance must be beteen 0 and 1 but was $distance");
return 0.5 *
((2 * _p1) +
(_p2 - _p0) * distance +
(2 * _p0 - 5 * _p1 + 4 * _p2 - _p3) * distance * distance +
(3 * _p1 - _p0 - 3 * _p2 + _p3) * distance * distance * distance);
}