UInt16.Clamp(UInt16, UInt16, UInt16) Method

Definition

Clamps a value to an inclusive minimum and maximum value.

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

Parameters

value
UInt16

The value to clamp.

min
UInt16

The inclusive minimum to which value should clamp.

max
UInt16

The inclusive maximum to which value should clamp.

Returns

The result of clamping value to the inclusive range of min and max.

Implements

Applies to