AdditiveArithmetic
public protocol AdditiveArithmetic : Equatable, Subtractable
A value that can be added and subtracted.
Note
UnlikeSignedNumber, AdditiveArithmetic types do not need to conform to Comparable, allowing conformance by two‐dimensional vectors, etc. For additional behaviour specific to one‐dimensional types, see NumericAdditiveArithmetic.
Conformance Requirements:
EquatableSubtractableExpressibleByIntegerLiteralorstatic var additiveIdentity: Self { get }
-
additiveIdentityDefault implementationThe additive identity (origin).
Default Implementation
The additive identity (origin).
Declaration
Swift
static var additiveIdentity: Self
View on GitHub
AdditiveArithmetic Protocol Reference