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

適用於