Windows apps
Collapse the table of content
Expand the table of content

Vector2::Clamp Method

Restricts a vector between a minimum and a maximum value.

Namespace:  System.Numerics
Assembly:  System.Numerics.Vectors (in System.Numerics.Vectors.dll)

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

Parameters

value1
Type: System.Numerics::Vector2

The vector to restrict.

min
Type: System.Numerics::Vector2

The minimum value.

max
Type: System.Numerics::Vector2

The maximum value.

Return Value

Type: System.Numerics::Vector2
The restricted vector.
Show:
© 2017 Microsoft