toInt method

int toInt()

Truncates this and returns the integer part.

Implementation

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