/// Creates from a given amount and unit
Creates from a given amount and unit
Creates from a given amount and unit
pub fn from(amount: f64, units: Units) -> Amount {
        match units {
            Units::Bch  => Amount((amount * 100_000_000.) as i64),
            Units::Bits => Amount((amount * 100.) as i64),
            Units::Sats => Amount(amount as i64),
            Units::Eth  => Amount((amount * 100_000_000.) as i64),
        }
    }
pub fn from ( amount : f64 , units : Units ) -> Amount { match units { Units :: Bch => Amount ( ( amount * 100_000_000. ) as i64 ) , Units :: Bits => Amount ( ( amount * 100. ) as i64 ) , Units :: Sats => Amount ( amount as i64 ) , Units :: Eth => Amount ( ( amount * 100_000_000. ) as i64 ) , } }
Creates from a given amount and unit
Creates from a given amount and unit
amount
f64
units
Units