NFloat.MaxMagnitudeNumber(NFloat, NFloat) 方法

定义

将两个值进行比较,以计算其具有更大的数量级并返回另一个值(如果输入为 NaN)。

public:
 static System::Runtime::InteropServices::NFloat MaxMagnitudeNumber(System::Runtime::InteropServices::NFloat x, System::Runtime::InteropServices::NFloat y) = System::Numerics::INumberBase<System::Runtime::InteropServices::NFloat>::MaxMagnitudeNumber;
public static System.Runtime.InteropServices.NFloat MaxMagnitudeNumber (System.Runtime.InteropServices.NFloat x, System.Runtime.InteropServices.NFloat y);
static member MaxMagnitudeNumber : System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat -> System.Runtime.InteropServices.NFloat
Public Shared Function MaxMagnitudeNumber (x As NFloat, y As NFloat) As NFloat

参数

x
NFloat

要与 y进行比较的值。

y
NFloat

要与 x进行比较的值。

返回

x 如果大于 y,则为 ;否则为 y

实现

注解

对于 IFloatingPointIeee754<TSelf> 此方法,与 IEEE 754:2019 maximumMagnitudeNumber 函数匹配。 这要求 NaN 输入不传播回调用方,并 -0.0 被视为小于 +0.0

适用于