Contents

-(_:_:)

Subtracts one decimal number from another.

Declaration

static func - (lhs: Decimal, rhs: Decimal) -> Decimal

Parameters

  • lhs:

    The value to subtract from.

  • rhs:

    The value to subtract.

Return Value

The result of subtracting rhs from lhs.

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 NSDecimalSubtract(_:_:_:_:) function instead.