Expand description

Implementations of traits for finding the remainder of two numbers, subject to various rounding rules.

These are the traits:

roundingby value or referenceby mutable reference (assignment)
towards $-\infty$ModModAssign
towards $\infty$NegModNegModAssign

NegMod returns a remainder greater than or equal to zero. This allows the remainder to have an unsigned type, but modifies the usual relation $x = qy + r$ to $x = qy - r$.

The Rem trait in the standard library rounds towards 0.