語言

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

傳回

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

實作

適用於