point method

Vector2 point(
  1. double length, {
  2. Vector2? out,
})

Gives the point at a certain length along the ray.

Implementation

Vector2 point(double length, {Vector2? out}) {
  return ((out?..setFrom(origin)) ?? origin.clone())
    ..addScaled(direction, length);
}