UInt16.Clamp(UInt16, UInt16, UInt16) 方法

定義

將值限制為內含最小值和最大值。

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

參數

value
UInt16

要限制的值。

min
UInt16

應限制的 value 內含最小值。

max
UInt16

應限制的 value 內含最大值。

傳回

限制為 和 maxmin 含範圍的結果 value

實作

適用於