語言

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 應該被夾住。

傳回

將 和 的包容範圍 valuemin箝取max後的結果。

實作

適用於