toInt method

int toInt()

Only safe if the value fits in the hi limb being zero and the lo limb being double-safe — delegates to Uint64.toInt()'s own guard, throwing IntegerError otherwise (use toBigInt for the general case).

Implementation

int toInt() {
  if (!_hi.isZero) {
    throw IntegerError.toIntConvertionError;
  }
  return _lo.toInt();
}