getValueInUnitBI method

num getValueInUnitBI(
  1. ArbitUnit unit
)

Gets the value of this amount in the specified unit as a whole number. WARNING: For all units except, this method will discard the remainder occurring in the division, making it unsuitable for calculations or storage. You should store and process amounts of poly by using a BigInt storing the amount in nanoarbit.

Implementation

num getValueInUnitBI(ArbitUnit unit) => quantity ~/ _factors[unit]!;