unstandard ~master (2017-05-26T08:42:45Z)
Dub
Repo
isPowerOf2
unstd
math
Returns
true
iff
n
is a power of 2.
Preconditions:
n
must be non-zero.
@
safe
pure nothrow @
nogc
bool
isPowerOf2
(
in
size_t
n
)
Meta
Source
See Implementation
unstd
math
functions
alignDown
alignUp
isAligned
isPowerOf2
log2RoundedDown
log2RoundedUp
roundDownToPowerOf2
roundUpToPowerOf2
Returns true iff n is a power of 2.
Preconditions: n must be non-zero.