nextPow2

fnT nextPow2(T)(const T val) if (isIntegral!T)

Gives the next power of two after val. T can be any built-in numerical type.

If the operation would lead to an over/underflow, this function will return 0.

Parameters

valany number

Returns

the next power of two after val
fnT nextPow2(T)(const T val) if (isFloatingPoint!T)

ditto