Vector3.Clamp Method (Vector3, Vector3, Vector3)
Restricts a value to be within a specified range.
Syntax
'Declaration
Public Shared Function Clamp ( _
value1 As Vector3, _
min As Vector3, _
max As Vector3 _
) As Vector3
public static Vector3 Clamp (
Vector3 value1,
Vector3 min,
Vector3 max
)
public:
static Vector3 Clamp(
Vector3 value1,
Vector3 min,
Vector3 max
)
Parameters
- value1
Type: Vector3
The value to clamp. - min
Type: Vector3
The minimum value. - max
Type: Vector3
The maximum value.
Return Value
Type: Vector3
The clamped value.
Requirements
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
See Also
Reference
Vector3 Structure
Vector3 Members
Microsoft.Xna.Framework Namespace
Platforms
Windows Phone