Type Method

# maximumMagnitude(_:_:)

Returns the value with greater magnitude.

## Parameters

`x`

A floating-point value.

`y`

Another floating-point value.

## Return Value

Whichever of `x` or `y` has greater magnitude, or whichever is a number if the other is NaN.

## Discussion

This method returns the value with greater magnitude of the two given values, preserving order and eliminating NaN when possible. For two values `x` and `y`, the result of `maximumMagnitude(x, y)` is `x` if `x.magnitude > y.magnitude`, `y` if `x.magnitude <= y.magnitude`, or whichever of `x` or `y` is a number if the other is a quiet NaN. If both `x` and `y` are NaN, or either `x` or `y` is a signaling NaN, the result is NaN.

The `maximumMagnitude` method implements the `maxNumMag` operation defined by the IEEE 754 specification.

### Comparing Values

Floating-Point Operators for Float

Perform arithmetic and bitwise operations or compare values.

`func isEqual(to: Float) -> Bool`

Returns a Boolean value indicating whether this instance is equal to the given value.

`func isLess(than: Float) -> Bool`

Returns a Boolean value indicating whether this instance is less than the given value.

`func isLessThanOrEqualTo(Float) -> Bool`

Returns a Boolean value indicating whether this instance is less than or equal to the given value.

`func isTotallyOrdered(belowOrEqualTo: Float) -> Bool`

Returns a Boolean value indicating whether this instance should precede or tie positions with the given value in an ascending sort.

`static func maximum(Float, Float) -> Float`

Returns the greater of the two given values.

`static func minimum(Float, Float) -> Float`

Returns the lesser of the two given values.