operator >> method

Int128 operator >>(
  1. int n
)

Arithmetic (sign-propagating) right shift.

Implementation

Int128 operator >>(int n) {
  final shift = n & 127;
  final logical = _bits >> shift;
  if (!isNegative || shift == 0) return Int128._(logical);
  final mask = ~(Uint128.max >> shift);
  return Int128._(logical | mask);
}