語言

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

傳回

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

實作

適用於