Editare

Partajați prin


Vector.Clamp<T> Method

Definition

Restricts a vector between a minimum and a maximum value.

public:
generic <typename T>
 static System::Numerics::Vector<T> Clamp(System::Numerics::Vector<T> value, System::Numerics::Vector<T> min, System::Numerics::Vector<T> max);
public static System.Numerics.Vector<T> Clamp<T> (System.Numerics.Vector<T> value, System.Numerics.Vector<T> min, System.Numerics.Vector<T> max);
static member Clamp : System.Numerics.Vector<'T> * System.Numerics.Vector<'T> * System.Numerics.Vector<'T> -> System.Numerics.Vector<'T>
Public Function Clamp(Of T) (value As Vector(Of T), min As Vector(Of T), max As Vector(Of T)) As Vector(Of T)

Type Parameters

T

Parameters

value
Vector<T>

The vector to restrict.

min
Vector<T>

The minimum value.

max
Vector<T>

The maximum value.

Returns

The restricted vector.

Applies to