Bagikan melalui


UInt16.Clamp(UInt16, UInt16, UInt16) Metode

Definisi

Menjepit nilai ke nilai minimum dan maksimum inklusif.

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

Parameter

value
UInt16

Nilai untuk menjepit.

min
UInt16

Minimum inklusif yang value harus menjepit.

max
UInt16

Maksimum inklusif yang value harus menjepit.

Mengembalikan

Hasil penjepitan value ke rentang min inklusif dan max.

Penerapan

Berlaku untuk