DynamicRoundedDecimal
public extension DynamicRoundedDecimal
-
Constructs a
MonetaryAmount
from aDynamicRoundedDecimal
with a givenCurrency
Example:
let roundedDecimal = DynamicRoundedDecimal(...) let money = roundedDecimal.in(.USD)
Declaration
Swift
func `in`(_ currency: Currency) -> MonetaryAmount
Parameters
currency
The target currency for the amount, e.g.
Currency.USD
Return Value
A
MonetaryAmount
fromself
with the givenCurrency