Helper for dividing several small integers by the same value. Note that there is no point using this class is the divisor is a compile-time constant, since the compiler should be smart enough to do this automatically. Building a QuickSmallDivision
object costs an integer division, but each call to DivideByDivisor
will only do an integer multiplication and a shift.
This class always return the exact value of the division for all possible values of dividend
and divisor
.
Definition at line 133 of file integer.h.