lineSegmentIntersection

open fun lineSegmentIntersection(p1: Vector2d, p2: Vector2d, p3: Vector2d, p4: Vector2d): Vector2d

Find the intersection of two line segments.

Return

The intersection point.

Parameters

p1

The first point of the first line segment.

p2

The second point of the first line segment.

p3

The first point of the second line segment.

p4

The second point of the second line segment.

Throws

If no intercept is found.