Math.MaxMagnitude(Double, Double) 方法

定义

返回两个双精度浮点数字中的较大值。Returns the larger magnitude of two double-precision floating-point numbers.

public:
 static double MaxMagnitude(double x, double y);
public static double MaxMagnitude (double x, double y);
static member MaxMagnitude : double * double -> double
Public Shared Function MaxMagnitude (x As Double, y As Double) As Double

参数

x
Double

要比较的两个双精度浮点数中的第一个。The first of two double-precision floating-point numbers to compare.

y
Double

要比较的两个双精度浮点数中的第二个The second of two double-precision floating-point numbers to compare.

返回

Double

参数 xy,取较大的值。Parameter x or y, whichever has the larger magnitude. 如果 xy 或者 xy 都等于 NaN,则返回 NaNIf x, or y, or both x and y are equal to NaN, NaN is returned.

适用于