lineSegmentXYUVOverlapUnbounded MethodStatic

Intersect two overlapping unbounded 2D lines.

lineSegmentXYUVOverlapUnbounded(a0: XAndY, aDir: XAndY, b0: XAndY, bDir: XAndY, tol: number = Geometry.smallMetricDistance): { f0: WritableXAndY, f1: WritableXAndY } | undefined

@returns undefined if the lines have a simple (transverse) intersection, or are parallel without overlap. Otherwise, return the fractions at which each segment overlaps the other line:

  • segment B maps to fractions in the range f0.x < f1.x on line A.
  • segment A maps to fractions in the range f0.y < f1.y on line B.

@see lineXYUVTransverseIntersection, lineSegmentXYUVIntersectionUnbounded

Parameter Type Description
a0 XAndY start point of line A
aDir XAndY direction vector of line A; end point of line segment A is a0 + aDir
b0 XAndY start point of line B
bDir XAndY direction vector of line B; end point of line segment B is b0 + bDir
tol number overlap distance tolerance

Returns - { f0: WritableXAndY, f1: WritableXAndY } | undefined

undefined if the lines have a simple (transverse) intersection, or are parallel without overlap. Otherwise, return the fractions at which each segment overlaps the other line:

  • segment B maps to fractions in the range f0.x < f1.x on line A.
  • segment A maps to fractions in the range f0.y < f1.y on line B.

Defined in

Last Updated: 04 June, 2026