intersectLineSegmentCircle

See source code

Find the intersections between a line segment and a circle.

function intersectLineSegmentCircle(
  a1: VecLike,
  a2: VecLike,
  c: VecLike,
  r: number
): null | VecLike[]

Parameters

NameDescription

a1

The segment's first point.

a2

The segment's second point.

c

The circle's center.

r

number

The circle's radius.

Returns

null | VecLike[]
Prev
intersectCirclePolyline
Next
intersectLineSegmentLineSegment