Conforming types are notionally continuous, one-dimensional values that can be offset and measured.


Comparing Values

func distance(to: Self)

Returns a stride x such that self.advanced(by: x) approximates other.

Required. Default implementation provided.

Creating a Range

static func ...(Self)

Returns a countable partial range extending upward from a lower bound.

Operator Functions

See Also

Basic Arithmetic

protocol Numeric

Declares methods backing binary arithmetic operators–such as +, - and *–and their mutating counterparts.

protocol SignedNumeric

A type that can represent both positive and negative values.