rotateRight

Rotate x right by n bits.

Should compile to a single CPU instruction (ROR).

TODO core.bitop.ror instead.

@safe pure nothrow @nogc
ulong
rotateRight
(
const scope ulong x
,
const scope uint n
)

Examples

assert(rotateRight(ulong.max, 1) == ulong.max);
assert(rotateRight(1UL, 1) == 2UL^^63);

Meta