MathF.Min(Single, Single) 方法

定义

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

public:
 static float Min(float x, float y);
public static float Min (float x, float y);
static member Min : single * single -> single
Public Shared Function Min (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.

返回

Single

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

适用于