intersections method

Set<Vector2> intersections(
  1. LineSegment line
)

Returns all intersections between this rectangle's edges and the given line segment.

Implementation

Set<Vector2> intersections(LineSegment line) {
  return edges.expand((e) => e.intersections(line)).toSet();
}