Skip to content

segment2Intersect

segment2Intersect(a, b, tolerance?): Point2 | null

Defined in: segment2.ts:47

Returns the intersection point of two line segments, or null if they do not intersect.

The parallel test scales the cross product by both segment lengths, so it is an angular threshold rather than a raw one — rescaling either segment leaves the answer unchanged, which a bare bound on denom would not.

Segment2

Segment2

number = geometryConfig.defaultAngularTolerance

Dimensionless bound on sin of the angle between the two segments, below which they count as parallel.

Point2 | null