Int32.Clamp(Int32, Int32, Int32) Methode

Definition

Klammert einen Wert auf einen inklusiven Minimal- und Maximalwert.

public:
 static int Clamp(int value, int min, int max) = System::Numerics::INumber<int>::Clamp;
public static int Clamp(int value, int min, int max);
static member Clamp : int * int * int -> int
Public Shared Function Clamp (value As Integer, min As Integer, max As Integer) As Integer

Parameter

value
Int32

Der zu klammernde Wert.

min
Int32

Das inklusive Minimum, an das value klammert werden soll.

max
Int32

Das inklusive Maximum, an das value geklemmt werden soll.

Gibt zurück

Das Ergebnis der Klammerung value an den inklusiven Bereich von min und max.

Implementiert

Gilt für: