Export (0) Print
Expand All

MathHelper.Clamp Method

Restricts a value to be within a specified range.

Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public static float Clamp (
         float value,
         float min,
         float max
)

Parameters

value
The value to clamp.
min
The minimum value.
max
The maximum value.

Return Value

The clamped value.

Xbox 360, Windows XP SP2, Windows Vista

Community Additions

ADD
Show:
© 2014 Microsoft