S32Divisor

Signed 32 bit divisor

Simply use on right side of division operation

Constructors

this
this(int32_t d)
Undocumented in source.

Members

Aliases

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

Functions

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

Variables

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

Examples

assert (1000 / S32Divisor(50) == 20);
// Can be used with CTFE
static assert (1000 / S32Divisor(50) == 20);

Meta