U32Divisor

Unsigned 32 bit divisor

Simply use on right side of division operation

Constructors

this
this(uint32_t d)
Undocumented in source.

Members

Aliases

Type
alias Type = typeof(magic)
Undocumented in source.

Functions

opAssign
auto ref opAssign(uint32_t d)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
uint32_t opBinaryRight(uint32_t dividend)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

magic
uint32_t magic;
Undocumented in source.
more
uint8_t more;
Undocumented in source.

Examples

assert (1000 / U32Divisor(31) == 32);
// Can be used with CTFE
static assert (1000 / U32Divisor(31) == 32);

Meta