Click or drag to resize

MathHelperFindIntersection Method (Vector2, Vector2, Vector2, Vector2)

imbVeles Framework: imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Calculates the intersection point of two lines.

Namespace:  netDxf
Assembly:  netDXF.Standard (in netDXF.Standard.dll) Version: 2.1.1
Syntax
C#
public static Vector2 FindIntersection(
	Vector2 point0,
	Vector2 dir0,
	Vector2 point1,
	Vector2 dir1
)
Request Example View Source

Parameters

point0
Type: netDxfVector2
First line origin point.
dir0
Type: netDxfVector2
First line direction.
point1
Type: netDxfVector2
Second line origin point.
dir1
Type: netDxfVector2
Second line direction.

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