intersectLineSegmentLineSegment

See source code

Find the intersection between a line segment and a line segment.

function intersectLineSegmentLineSegment(
  a1: VecLike,
  a2: VecLike,
  b1: VecLike,
  b2: VecLike,
  precision?: number
): null | Vec

Parameters

NameDescription

a1

The first segment's first point.

a2

The first segment's second point.

b1

The second segment's first point.

b2

The second segment's second point.

precision

number

Returns

null | Vec
Prev
intersectLineSegmentCircle
Next
intersectLineSegmentPolygon