MathF.MinMagnitude(Single, Single) 方法

定义

返回两个单精度浮点数字中的较小值。Returns the smaller magnitude of two single-precision floating-point numbers.

public:
 static float MinMagnitude(float x, float y);
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

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

y
Single

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

返回

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

适用于