Method MaxNumber
- Namespace
- Zyl.VectorTraits
- Assembly
- VectorTraits.dll
MaxNumber(float, float)
Compares two values to compute which is greater and returning the other value if an input is NaN (取得两个值中较大的数字. 若其中一个是NaN, 则会返回另一个值).
public static float MaxNumber(float x, float y)
Parameters
xfloatThe value to compare with
y(要与y进行比较的值).yfloatThe value to compare with
x(要与x进行比较的值).
Returns
- float
Return the greater number of two variables (返回两个值中较大的数字.).
Remarks
This method matches the IEEE 754:2019 maximumNumber function. This requires NaN inputs to not be propagated back to the caller and for -0.0 to be treated as less than +0.0 (此方法与 IEEE 754:2019 maximumNumber 函数匹配。 这要求 NaN 输入不传播回调用方,且 -0.0 被视为小于 +0.0).
- See Also
-
MaxNumber(TSelf, TSelf)
MaxNumber(double, double)
Compares two values to compute which is greater and returning the other value if an input is NaN (取得两个值中较大的数字. 若其中一个是NaN, 则会返回另一个值).
public static double MaxNumber(double x, double y)
Parameters
xdoubleThe value to compare with
y(要与y进行比较的值).ydoubleThe value to compare with
x(要与x进行比较的值).
Returns
- double
Return the greater number of two variables (返回两个值中较大的数字.).
Remarks
This method matches the IEEE 754:2019 maximumNumber function. This requires NaN inputs to not be propagated back to the caller and for -0.0 to be treated as less than +0.0 (此方法与 IEEE 754:2019 maximumNumber 函数匹配。 这要求 NaN 输入不传播回调用方,且 -0.0 被视为小于 +0.0).
- See Also
-
MaxNumber(TSelf, TSelf)
MaxNumber(Half, Half)
Compares two values to compute which is greater and returning the other value if an input is NaN (取得两个值中较大的数字. 若其中一个是NaN, 则会返回另一个值).
public static Half MaxNumber(Half x, Half y)
Parameters
Returns
- Half
Return the greater number of two variables (返回两个值中较大的数字.).
Remarks
This method matches the IEEE 754:2019 maximumNumber function. This requires NaN inputs to not be propagated back to the caller and for -0.0 to be treated as less than +0.0 (此方法与 IEEE 754:2019 maximumNumber 函数匹配。 这要求 NaN 输入不传播回调用方,且 -0.0 被视为小于 +0.0).
- See Also
-
MaxNumber(TSelf, TSelf)