Type Property

infinity

Positive infinity.

Declaration

static var infinity: Float { get }

Discussion

Infinity compares greater than all finite numbers and equal to other infinite values.

let x = Double.greatestFiniteMagnitude
let y = x * 2
// y == Double.infinity
// y > x

Relationships

From Protocol

See Also

Accessing Numeric Constants

static var pi: Float

The mathematical constant pi.

static var greatestFiniteMagnitude: Float

The greatest finite number representable by this type.

static var nan: Float

A quiet NaN (“not a number”).

static var signalingNaN: Float

A signaling NaN (“not a number”).

static var ulpOfOne: Float

The unit in the last place of 1.0.

static var leastNormalMagnitude: Float

The least positive normal number.

static var leastNonzeroMagnitude: Float

The least positive number.

static var zero: Float

The zero value.