true if x is an integer power of two.bool isPowerOf2(X)(const X x) if (isNumeric!X) pure @safe nothrow @nogcCheck whether a number is an integer power of two.
Note that only positive numbers can be integer powers of two. This function always return false if x is negative or zero.
x | the number to test |
true if x is an integer power of two.