Public Member Functions | |
FixedDivisor (const std::int32_t d) | |
FIXED_DIVISOR_DECL std::int32_t | d () const |
FIXED_DIVISOR_DECL std::uint64_t | magic () const |
FIXED_DIVISOR_DECL int | shift () const |
FIXED_DIVISOR_DECL std::int32_t | Div (const std::int32_t n) const |
Calculates q = n / d . | |
FIXED_DIVISOR_DECL std::int32_t | Mod (const std::int32_t n) const |
Calculates r = n % d . | |
FIXED_DIVISOR_DECL void | DivMod (const std::int32_t n, std::int32_t *q, int32_t *r) const |
Calculates q = n / d and r = n % d together. | |
Definition at line 27 of file fixed_divisor.h.