语言

Single.MinMagnitude(Single, Single) 方法

定义

比较两个值与计算值较小。

public:
 static float MinMagnitude(float x, float y) = System::Numerics::INumberBase<float>::MinMagnitude;
public static float MinMagnitude(float x, float y);
static member MinMagnitude : single * single -> single
Public Shared Function MinMagnitude (x As Single, y As Single) As Single

参数

x
Single

要与 y.. 进行比较的值。

y
Single

要与 x.. 进行比较的值。

返回

x 如果小于 y,则为 ;否则为 y。

实现

注解

有关 <cref=“T:System.Numerics.IFloatingPointIeee7541> this method matches the IEEE 754:2019 minimumMagnitude-0.0function. This requires NaN inputs to not be propagated back to the caller and forto be treated as less than+0.0'。

适用于