Click or drag to resize

MathHelperFindIntersection Method (Vector2, Vector2, Vector2, Vector2, Double)

Calculates the intersection point of two lines.

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax
public static Vector2 FindIntersection(
	Vector2 point0,
	Vector2 dir0,
	Vector2 point1,
	Vector2 dir1,
	double threshold
)

Parameters

point0
Type: DXFReaderNETVector2
First line origin point.
dir0
Type: DXFReaderNETVector2
First line direction.
point1
Type: DXFReaderNETVector2
Second line origin point.
dir1
Type: DXFReaderNETVector2
Second line direction.
threshold
Type: SystemDouble
Tolerance.

Return Value

Type: Vector2
The intersection point between the two line.
Remarks
If the lines are parallel the method will return a Vector2.NaN.
See Also