UInt32.Clamp(UInt32, UInt32, UInt32) 方法

定義

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

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

參數

value
UInt32

要限制的值。

min
UInt32

應固定的 value 內含最小值。

max
UInt32

應固定的 value 內含最大值。

傳回

限制 value 為 和 max 之內含範圍 min 的結果。

實作

適用於