operator >> method

  1. @override
u4 operator >>(
  1. dynamic other
)
override

Shift the bits of this integer to the right by shiftAmount.

Shifting to the right makes the number smaller and drops the least significant bits, effectively doing an integer division by pow(2, shiftIndex).

It is an error if shiftAmount is negative.

Returns u4

Implementation

@override
u4 operator >>(dynamic other) {
  if (other is integer) {
    return u4(value >> other.value);
  } else if (other is int) {
    return u4(value >> other);
  } else {
    throw Exception('Invalid type for operand: ${other.runtimeType}');
  }
}