UInt64.Clamp(UInt64, UInt64, UInt64) 方法

定義

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

public:
 static System::UInt64 Clamp(System::UInt64 value, System::UInt64 min, System::UInt64 max) = System::Numerics::INumber<System::UInt64>::Clamp;
public static ulong Clamp (ulong value, ulong min, ulong max);
static member Clamp : uint64 * uint64 * uint64 -> uint64
Public Shared Function Clamp (value As ULong, min As ULong, max As ULong) As ULong

參數

value
UInt64

要限制的值。

min
UInt64

應固定的 value 內含最小值。

max
UInt64

應固定的 value 內含最大值。

傳回

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

實作

適用於