Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@extra-bit/scan-reverse.min

1.0.52 • Public • Published

Gets index of first set bit from MSB. 🏃 📼 📦 🌔 📒

Alternatives: scan, scanReverse.
This is part of package extra-bit.

This is browserified, minified version of @extra-bit/scan-reverse.
It is exported as global variable bit_scanReverse.
CDN: unpkg, jsDelivr.

bit.scanReverse(x);
// x: an int32
const bit = require('extra-bit');
 
bit.scanReverse(13);
// 13 (1101 => 3)
 
bit.scanReverse(5);
// 2 (101 => 2)
 
bit.scanReverse(1);
// 0 (1 => 0)

references

Install

npm i @extra-bit/scan-reverse.min

DownloadsWeekly Downloads

130

Version

1.0.52

License

MIT

Unpacked Size

5.84 kB

Total Files

14

Last publish

Collaborators

  • avatar