operator >>> method
Bitwise unsigned right shift by shiftAmount
bits.
The least significant shiftAmount
bits are dropped,
the remaining bits (if any) are shifted down,
and zero-bits are shifted in as the new most significant bits.
The shiftAmount
must be non-negative.
Example:
print((Obj(3) >>> Obj(1)).toRadixString(2)); // 0011 -> 0001
print((Obj(9) >>> Obj(2)).toRadixString(2)); // 1001 -> 0010
print((Obj(-9) >>> Obj(2)).toRadixString(2)); // 111...1011 -> 001...1110 (> 0)
Implementation
Obj<int> operator >>>(Obj<int> shiftAmount) =>
(value >>> shiftAmount.value).obj;