use std math functions rather than a loop and a bit shift
use std math functions rather than a loop and a bit shift

There is no real extra-cost, as compilers can now produce very
efficient asm code.

I don't think it makes it easier to understand what the function
does (comments are still needed), but the advantage of using std
functions will become more obvious with newer C++ revisions. With
C++20, these math function calls can be replaced with a single
std::bit_ceil().

torognes/swarm,torognes/swarm,torognes/swarm