power-of-two

Power of two math utility for Haxe
https://github.com/eliasku/power-of-two

To install, run:

haxelib install power-of-two 0.0.1 

See using Haxelib in Haxelib documentation for more information.

README.md

power-of-two

Power of two math utility for Haxe

  • PowerOfTwo.next(x:Int) returns next POT value. For example for 16 it will be 32, for 24 it will be also 32
  • PowerOfTwo.check(x:Int) checks if value is POT (excluding 0)
  • PowerOfTwo.require(x:Int) returns x if POT, else returns nearest next POT
Contributors
eliasku
Version
0.0.1
Published
1 year ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github