Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

e7852db9 c3d9 724f 740d 35b5a221c6fa

haplokuon edited this page May 6, 2023 · 1 revision

FindIntersection(Vector2, Vector2, Vector2, Vector2, Double) Method

netDxf 3.0.0 Library

Calculates the intersection point of two lines.

Definition

Namespace: netDxf
Assembly: netDxf (in netDxf.dll) Version: 3.0.0

C#

public static Vector2 FindIntersection(
	Vector2 point0,
	Vector2 dir0,
	Vector2 point1,
	Vector2 dir1,
	double threshold
)

VB

Public Shared Function FindIntersection ( 
	point0 As Vector2,
	dir0 As Vector2,
	point1 As Vector2,
	dir1 As Vector2,
	threshold As Double
) As Vector2

C++

public:
static Vector2 FindIntersection(
	Vector2 point0, 
	Vector2 dir0, 
	Vector2 point1, 
	Vector2 dir1, 
	double threshold
)

F#

static member FindIntersection : 
        point0 : Vector2 * 
        dir0 : Vector2 * 
        point1 : Vector2 * 
        dir1 : Vector2 * 
        threshold : float -> Vector2 

Parameters

  Vector2
First line origin point.
  Vector2
First line direction.
  Vector2
Second line origin point.
  Vector2
Second line direction.
  Double
Tolerance.

Return Value

Vector2
The intersection point between the two lines.

Remarks

If the lines are parallel the method will return a Vector2.NaN.

See Also

Reference

MathHelper Class
FindIntersection Overload
netDxf Namespace

Clone this wiki locally