UInt16.Clamp(UInt16, UInt16, UInt16) Metod

Definition

Klämmer fast ett värde till ett inkluderande lägsta och högsta värde.

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

Parametrar

value
UInt16

Värdet som ska klämmas in.

min
UInt16

Det inkluderande minimum som value ska spännas fast.

max
UInt16

Den inkluderande maxgränsen som value ska spännas fast.

Returer

Resultatet av klämning value till det inkluderande intervallet av min och max.

Implementeringar

Gäller för