共用方式為


NFloat.Clamp(NFloat, NFloat, NFloat) 方法

定義

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

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

參數

value
NFloat

要限制的值。

min
NFloat

應限制的 value 內含最小值。

max
NFloat

應限制的 value 內含最大值。

傳回

限制為和maxmin含範圍的結果value

實作

適用於