🔢Numbers
Numeric protocols
supports
AdditiveArithmetic
a + b, a - b, .zero
Numeric
a * b
SignedNumeric
-a (additive inverse)
FloatingPoint
a / b, a < b
Int(a)
seq.sum of all elments.
diploid ⟩ Numeric protocols
Andy Bargh ⟩ Swift ⟩ The Swift Numeric Data Types
Swift ⟩ Numbers and Basic Values ⟩
Global Numeric Functions - min(), max(), abs().

BinaryInteger: protocol for integers.
BinaryFloatingPoint: protocol for floating-point numbers.
Last updated
Was this helpful?