SByte.Clamp(SByte, SByte, SByte) 方法

定義

將值限制為內含最小值和最大值。

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

參數

value
SByte

要限制的值。

min
SByte

應固定的 value 內含最小值。

max
SByte

應固定的 value 內含最大值。

傳回

限制 value 為 和 max 之內含範圍 min 的結果。

實作

適用於