U64Divisor

Unsigned 64 bit divisor

Simply use on right side of division operation

Constructors

this
this(uint64_t d)
Undocumented in source.

Members

Aliases

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

Functions

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

Variables

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

Examples

assert (1_000_000_000_000 / S64Divisor(1783) == 560_852_495);
// Can be used with CTFE
static assert (1_000_000_000_000 / S64Divisor(1783) == 560_852_495);

Meta