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