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