mantissaDigit method Null safety

int mantissaDigit(
  1. int digit
)

Give one digit of the mantissa, where 0 is the MSD, and 9 is the LSD. -1 gives the sign digit (9 is negative, 0 is positive).

Implementation

int mantissaDigit(int digit) {
  assert(digit >= -1 && digit <= 9);
  final r = ((internal >> 4 * (12 - digit)) & _maskF).toInt();
  assert(r <= 9 && r >= 0);
  return r;
}