operator >> method

Int32 operator >>(
  1. int n
)

Arithmetic (sign-propagating) right shift.

Implementation

Int32 operator >>(int n) {
  final shift = n & 31;
  if (shift == 0) return this;
  // toInt() is always safe (magnitude <= 2^31), and a right shift only
  // shrinks magnitude, so the plain core `>>` is safe here too.
  return Int32._((toInt() >> shift) & BinaryOps.mask32);
}