UInt32.Clamp(UInt32, UInt32, UInt32) Metod

Definition

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

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

Parametrar

value
UInt32

Värdet som ska klämmas in.

min
UInt32

Det inkluderande minimum som value ska spännas fast.

max
UInt32

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