toInt method

int toInt()

Only safe if the top three limbs are zero and the low limb is double-safe — delegates to Uint64.toInt()'s own guard, throwing IntegerError otherwise (use toBigInt for the general case).

Implementation

int toInt() {
  if (!_d3.isZero || !_d2.isZero || !_d1.isZero) {
    throw IntegerError.toIntConvertionError;
  }
  return _d0.toInt();
}