Click or drag to resize

UtilBoundedSnapTo(Vector2, Vector2, Vector2) Method

Return the point in the line segment [v1,v2] that is closest to the point 'p'

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

Parameters

p  Vector2
Value to test
v1  Vector2
Lower bound
v2  Vector2
Upper bound

Return Value

Vector2
Closest value
See Also