shiftRightUnsigned method

  1. @override
Int32 shiftRightUnsigned(
  1. int n
)
override

Unsigned right-shift operator.

Returns the result of shifting the bits of this integer by shiftAmount bits to the right. High-order bits are filled with zeros.

Implementation

@override
Int32 shiftRightUnsigned(int n) {
  if (n < 0) {
    throw ArgumentError(n);
  }
  if (n >= 32) {
    return ZERO;
  }
  int value;
  if (_i >= 0) {
    value = _i >> n;
  } else {
    value = (_i >> n) & ((1 << (32 - n)) - 1);
  }
  return Int32(value);
}