scanReverse - nodef/extra-bit GitHub Wiki
Find index of first set bit from MSB.
Alternatives: scan, scanReverse.
scanReverse(x)
// x: an int32
const xbit = require('extra-bit');
xbit.scanReverse(13);
// → 13 (1101 ⇒ 3)
xbit.scanReverse(5);
// → 2 (101 ⇒ 2)
xbit.scanReverse(1);
// → 0 (1 ⇒ 0)