Click or drag to resize

UtilBoundedDistanceTo(Vector2, Vector2, Vector2) Method

Find the distance of a point from a line segment.

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

Parameters

p  Vector2
Point to test.
v1  Vector2
Start of line segment.
v2  Vector2
End of line segment.

Return Value

Double
Distance of point from line segment.
See Also