lineIntersection

fun lineIntersection(p1: Vector2d, p2: Vector2d, p3: Vector2d, p4: Vector2d): Vector2d

Find the intersection of two lines.

Return

The intersection point.

Parameters

p1

The first point of the first line.

p2

The second point of the first line.

p3

The first point of the second line.

p4

The second point of the second line.

Throws

If no intercept is found.