One use-case that springs immediately to mind is creating ranges of
magnitudes. It is not sufficient to use abs() because that returns the same
type which may not be comparable.

Also, a fairly common operation on complex numbers (or indeed any
metric space) is to see if two values are within distance d of each other.
In other words, to check whether the magnitude of their difference is less
than d. This again requires comparability of magnitudes.

Nevin
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to