Click or drag to resize

UtilSnapTo Method (Int32, Int32, Int32)

Return the value between [v1,v2] that is closest to 'p'

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

Parameters

p
Type: SystemInt32
Value to test
v1
Type: SystemInt32
Lower bound
v2
Type: SystemInt32
Upper bound

Return Value

Type: Int32
Closest value
See Also