Operator

+=(_:_:)

Adds two decimal numbers, storing the result in the first number.

Declaration

static func += (lhs: inout Decimal, rhs: Decimal)

Discussion

If the result of this operation requires more precision than the Decimal type can provide, the result is rounded using the NSDecimalNumber.RoundingMode.plain rounding mode. To specify a different rounding mode, use the NSDecimalAdd(_:_:_:_:) function instead.

Relationships

From Protocol

See Also

Performing Arithmetic

static func * (Decimal, Decimal) -> Decimal

Multiplies two decimal numbers.

static func *= (inout Decimal, Decimal)

Multiplies two decimal numbers, storing the result in the first number.

static func - (Decimal, Decimal) -> Decimal

Subtracts one decimal number from another.

static func -= (inout Decimal, Decimal)

Subtracts one decimal number from another, storing the result in the first number.

static func / (Decimal, Decimal) -> Decimal

Divides one decimal number by another.

static func /= (inout Decimal, Decimal)

Divides one decimal number by another, storing the result in the first number.

func pow(Decimal, Int) -> Decimal

Returns a decimal number raised to a given power.

func negate()

Negates this decimal.