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 非独占最大值。

返回

固定value到 和 maxmin包含范围的结果。

实现

适用于