Addable

public protocol Addable

A type that defines an addition operator and an additive identity.

  • The value for this type that represents the additive identity zero. The result of x + Self.zero should be x.

    Declaration

    Swift

    static var zero: Self { get }
  • Adds two instances of this type.

    Declaration

    Swift

    static func + (lhs: Self, rhs: Self) -> Self