unstandard ~master (2017-05-26T08:42:45Z)
Dub
Repo
isAligned
unstd
math
Aligns
n
up or down.
Preconditions:
alignment
must be power of 2.
bool
isAligned
(size_t alignment, size_t n)
bool
isAligned
(size_t n)
@
safe
pure nothrow @
nogc
bool
isAligned
(
size_t
alignment
)
(
in
size_t
n
)
if
(
isPowerOf2
(
alignment
)
)
Meta
Source
See Implementation
unstd
math
functions
alignDown
alignUp
isAligned
isPowerOf2
log2RoundedDown
log2RoundedUp
roundDownToPowerOf2
roundUpToPowerOf2
Aligns n up or down.
Preconditions: alignment must be power of 2.