语言

Int16.Clamp(Int16, Int16, Int16) 方法

定义

将值固定到非独占最小值和最大值。

public:
 static short Clamp(short value, short min, short max) = System::Numerics::INumber<short>::Clamp;
public static short Clamp(short value, short min, short max);
static member Clamp : int16 * int16 * int16 -> int16
Public Shared Function Clamp (value As Short, min As Short, max As Short) As Short

参数

value
Int16

要固定的值。

min
Int16

应固定到 value 的包容性最小值。

max
Int16

应固定到 value 的非独占最大值。

返回

固定 value 到非独占范围 min 和 max.

实现

适用于