Currency 0.3.0
Pre-release
Pre-release
Major
AnyCurrency
storage is now "minorUnits" 44425d8AnyCurrency
now usesInt64
"minorUnits" as the underlying storage instead ofFoundation.Decimal
"exactAmount"AnyCurrency.roundedAmount
is nowamount
AnyCurrency.init(minorUnits:)
is now.init(exactly:)
- This is now required by the
AnyCurrency
protocol
- This is now required by the
_CurrencyImplementation
has been renamed and made public asCurrencyProtocol
d4fcba8- This is the protocol to reference as a generic constraint, while
AnyCurrency
can be used as a type-erased existential
- This is the protocol to reference as a generic constraint, while
Minor
AnyCurrency
now has a "minorUnits" property 44425d8AnyCurrency
now has two methods for distribution algorithms 46f75f0distributedEvenly(intoParts:)
distributedProportionally(between:)
AnyCurrency
now has aninverse
computed property for getting the opposite signed value 46f75f0- Sequences with
AnyCurrency
elements now has a inlined mappingsum(_:)
overload b898bb4
Patch
- The
Currency
module should now be able to be embedded in iOS apps 46aa110 sum
andsum(where:)
should now property be O(n) and inlinable for more performance 71285fe
Misc
- Tests are now run against Swift 5 in addition to 5.1