Export (0) Print
Expand All

Vector2.Clamp Method (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)

public static Vector2 Clamp(
	Vector2 value1,
	Vector2 min,
	Vector2 max
)

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.

Return Value

Type: Microsoft.Xna.Framework.Vector2
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:
© 2014 Microsoft