power-of-two 0.0.1

Power of two math utility for Haxe

Released 2016-10-10.

To install, run:

haxelib install power-of-two 0.0.1

See using Haxelib in Haxelib documentation for more information.

Maintainereliasku
Websitehttps://github.com/eliasku/power-of-two
Current version0.0.1
StatisticsInstalled 24 times
LicenseMIT
Tags math, utility

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