Public function

Find the intersections between a line segment and a circle.

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

a1

VecLike

The segment's first point.

a2

VecLike

The segment's second point.

c

VecLike

The circle's center.

r

number

The circle's radius.

Returns
null | VecLike[]
References

VecLike

Source

packages/editor/src/lib/primitives/intersect.ts

intersectCirclePolylineintersectLineSegmentLineSegment