Bagikan melalui


UInt32.Clamp(UInt32, UInt32, UInt32) Metode

Definisi

Menjepit nilai ke nilai minimum dan maksimum inklusif.

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

Parameter

value
UInt32

Nilai untuk menjepit.

min
UInt32

Minimum inklusif yang value harus menjepit.

max
UInt32

Maksimum inklusif yang value harus menjepit.

Mengembalikan

Hasil penjepitan value ke rentang min inklusif dan max.

Penerapan

Berlaku untuk