Click or drag to resize

UtilsGetIntersection Method

Returns the intersection of two 2D lines.

Namespace: RAYLASE.Marker.VectorGraphicElement
Assembly: RAYLASE.Marker.VectorGraphicElement (in RAYLASE.Marker.VectorGraphicElement.dll) Version: 2.19.0
Syntax
C#
public static dvec2? GetIntersection(
	dvec2 line0Start,
	dvec2 line0End,
	dvec2 line1Start,
	dvec2 line1End,
	bool onlySegment
)

Parameters

line0Start  dvec2
Start of line 0.
line0End  dvec2
End of line 0.
line1Start  dvec2
Start of line 1.
line1End  dvec2
End of line 1.
onlySegment  Boolean
Get intersection only on line segment. Otherwise lines will be treated as having unlimited length.

Return Value

Nullabledvec2
Returns intersection of the provided lines. Null in case none is found (either lines are parallel or onlySegment is used and segment doesn't have any intersection).
See Also