Integer.rotateRight

Returns the value obtained by rotating the two's complement binary representation of the specified {@code int} value right by the specified number of bits. (Bits shifted out of the right hand, or low-order, side reenter on the left, or high-order.)

<p>Note that right rotation with a negative distance is equivalent to left rotation: {@code rotateRight(val, -distance) == rotateLeft(val, distance)}. Note also that rotation by any multiple of 32 is a no-op, so all but the last five bits of the rotation distance can be ignored, even if the distance is negative: {@code rotateRight(val, distance) == rotateRight(val, distance & 0x1F)}.

@param i the value whose bits are to be rotated right @param distance the number of bit positions to rotate right @return the value obtained by rotating the two's complement binary representation of the specified {@code int} value right by the specified number of bits.

class Integer
static
int
rotateRight
(
int i
,)

Meta