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 為 和 max 之內含範圍 min 的結果。

實作

適用於