computeIntersection

fun computeIntersection(segment1: Segment<Vec2>, segment2: Segment<Vec2>): Vec2(source)

Computes the intersection point of two segments.

Return

The intersection point of the two segments.

Parameters

segment1

The first segment.

segment2

The second segment.

Throws

if the segments do not intersect or are collinear.