lineCircleIntersection

fun lineCircleIntersection(p1: Vector2d, p2: Vector2d, center: Vector2d, radius: Number): Pair<Vector2d, Vector2d>

Find the intersection between a line and a circle.

Return

The intersection points.

Parameters

p1

The first point of the line.

p2

The second point of the line.

center

The position of the center of the circle.

radius

The radius of the circle.

Throws

If no intercepts are found.