offsetPointAt method
Vector2
offsetPointAt(})
Returns the point distance
units away in the clockwise direction from
the point along the curve at parameter value t
.
See derivativeAt for information about the optional parameter cachedFirstOrderDerivativePoints
.
Implementation
Vector2 offsetPointAt(double t, double distance,
{List<Vector2>? cachedFirstOrderDerivativePoints}) {
final offsetPoint = pointAt(t);
final normalVector = normalAt(t,
cachedFirstOrderDerivativePoints: cachedFirstOrderDerivativePoints);
offsetPoint.addScaled(normalVector, distance);
return offsetPoint;
}