Click or drag to resize

UtilDistanceTo Method (Vector2, Vector2, Vector2)

Find the distance of a point from a line.

See this page.

Namespace:  Demo3D.Common
Assembly:  Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntax
C#
public static double DistanceTo(
	Vector2 p,
	Vector2 v1,
	Vector2 v2
)

Parameters

p
Type: Microsoft.DirectXVector2
Point to test.
v1
Type: Microsoft.DirectXVector2
First point on line.
v2
Type: Microsoft.DirectXVector2
Second point on line.

Return Value

Type: Double
Distance of point from line.
See Also