intersectLineSegmentPolygon

See source code

Find the intersections between a line segment and a closed polygon.

function intersectLineSegmentPolygon(
  a1: VecLike,
  a2: VecLike,
  points: VecLike[]
): null | VecLike[]

Parameters

NameDescription

a1

The segment's first point.

a2

The segment's second point.

points

The points in the polygon.

Returns

null | VecLike[]
Prev
intersectLineSegmentLineSegment
Next
intersectLineSegmentPolyline