Returns a Boolean value indicating whether this instance should precede or tie positions with the given value in an ascending sort.
Required. Default implementation provided.
- Xcode 8.0+
- Swift Standard Library
A floating-point value to compare to this value.
true if this value is ordered below or the same as
other in a total ordering of the floating-point type; otherwise,
This relation is a refinement of the less-than-or-equal-to operator (
<=) that provides a total order on all values of the type, including signed zeros and NaNs.
The following example uses
is to sort an array of floating-point values, including some that are NaN:
is method implements the total order relation as defined by the IEEE 754 specification.