-
Notifications
You must be signed in to change notification settings - Fork 1
rotate
Subhajit Sahu edited this page Feb 2, 2021
·
12 revisions
bit.rotate(x, [n]);
// x: an int32
// n: rotate amount (+ve: left, -ve: right)
const bit = require('extra-bit');
bit.rotate(0x11112222, 4);
// 286401057 (0x11122221)
bit.rotate(0x11112222, -4);
// 554766882 (0x21111222)