toInt method

int toInt()

Truncates this and returns the integer part.

Implementation

int toInt() => minorUnits == BigInt.zero
    ? 0
    : (minorUnits ~/ BigInt.from(10).pow(scale)).toInt();