Vector2.Clamp Method (Vector2%, Vector2%, Vector2%, Vector2%)

Restricts a value to be within a specified range.

Namespace:  Microsoft.Xna.Framework
Assembly:  Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)

'Declaration
Public Shared Sub Clamp ( _
	ByRef value1 As Vector2, _
	ByRef min As Vector2, _
	ByRef max As Vector2, _
	<OutAttribute> ByRef result As Vector2 _
)

Parameters

value1
Type: Microsoft.Xna.Framework.Vector2%
The value to clamp.
min
Type: Microsoft.Xna.Framework.Vector2%
The minimum value.
max
Type: Microsoft.Xna.Framework.Vector2%
The maximum value.
result
Type: Microsoft.Xna.Framework.Vector2%
[OutAttribute] The clamped value.

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: