toUnsigned method
Returns the least significant width
bits of this integer as a
non-negative number (i.e. unsigned representation). The returned value has
zeros in all bit positions higher than width
.
If the input fits in width
bits without truncation, the result is the
same as the input. The minimum width needed to avoid truncation of x
is
given by x.bitLength
, i.e.
x == x.toUnsigned(x.bitLength);
Implementation
@override
Int32 toUnsigned(int width) {
if (width < 0 || width > 32) throw RangeError.range(width, 0, 32);
return Int32(_i.toUnsigned(width));
}