![Neil Roberts](/assets/img/avatar_default.png)
This takes the simple algorithm from here: http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2 This avoids a loop and is much faster.
This takes the simple algorithm from here: http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2 This avoids a loop and is much faster.