Returns the greater of the two given values.
Required. Default implementation provided.
- Xcode 10.0+
- Swift Standard Library
A floating-point value.
Another floating-point value.
The greater of
y, or whichever is a number if the other is NaN.
This method returns the maximum of two values, preserving order and eliminating NaN when possible. For two values
y, the result of
maximum(x, y) is
x > y,
x <= y, or whichever of
y is a number if the other is a quiet NaN. If both
y are NaN, or either
y is a signaling NaN, the result is NaN.
maximum method implements the
max operation defined by the IEEE 754 specification.