Money.separated constructor

Money.separated(
  1. int integer,
  2. int fraction,
  3. Currency currency
)

Accepts main and fractional part of the amount as two integers

Implementation

factory Money.separated(int integer, int fraction, Currency currency) =>
    Money(integer * pow(10, currency.digits).floor() + fraction, currency);