语言

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 到非独占范围 min 和 max.

实现

适用于