Returns the distance from this value to the specified value.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Parameters
other
A value to calculate the distance to.
Return Value
The distance between this value and other
.
Discussion
For two values x
and y
, the result of x
is equal to y - x
—a distance d
such that x
approximates y
. For example: