MathF.Max(Single, Single) 方法

定义

返回两个单精度浮点数字中较大的一个。

public:
 static float Max(float x, float y);
public static float Max (float x, float y);
static member Max : single * single -> single
Public Shared Function Max (x As Single, y As Single) As Single

参数

x
Single

要比较的两个单精度浮点数中的第一个。

y
Single

要比较的两个单精度浮点数中的第二个。

返回

xy 参数中较大的一个。 如果 xy 或者 xy 都等于 NaN,则返回 NaN

适用于