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

Clamps the value to the specified range. The clamp is inclusive of the minimum and maximum.

Namespace: org.critterai
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static int Clamp(
	int value,
	int minimum,
	int maximum
)
Public Shared Function Clamp ( _
	value As Integer, _
	minimum As Integer, _
	maximum As Integer _
) As Integer
public:
static int Clamp(
	int value, 
	int minimum, 
	int maximum
)

Parameters

value
Int32
The value to clamp.
minimum
Int32
The minimum allowed value.
maximum
Int32
The maximum allowed value.

Return Value

The value clamped to the specified range.

See Also