nearest-power-of-two

1.0.0 • Public • Published

nearest-power-of-two

Given a number, returns the nearest power of two.

var npot = require('nearest-power-of-two')

npot(3) === 4

API

require('nearest-power-of-two')(Number) -> Number

The package exports a single function which takes a number and returns a number. Only works for numbers less than 2^32.

license

MIT

Readme

Keywords

Package Sidebar

Install

npm i nearest-power-of-two

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • chrisdickinson