Clamp Method (Single, Single, Single)

Project Mercury API

[This is preliminary documentation and is subject to change.]

Restricts a value to be within a specified range.

Namespace:  ProjectMercury
Assembly:  ProjectMercury (in ProjectMercury.dll) Version: 3.1.0.0

Syntax

C#
public static void Clamp(
	ref float value,
	float min,
	float max
)
Visual Basic (Declaration)
Public Shared Sub Clamp ( _
	ByRef value As Single, _
	min As Single, _
	max As Single _
)
Visual C++
public:
static void Clamp(
	float% value, 
	float min, 
	float max
)

Parameters

value
Type: System..::.Single %
The value to clamp.
min
Type: System..::.Single
The minimum value. If value is less than min, value will be assigned min.
max
Type: System..::.Single
The maximum value. If value is greater than max, value will be assigned max.

See Also