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

982b932c 0a91 c86b 2ff0 0e520fe75819

haplokuon edited this page May 6, 2023 · 1 revision

FindIntersection(Vector2, Vector2, Vector2, Vector2) 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
)

VB

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

C++

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

F#

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

Parameters

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

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