Performs truncated division and remainder.
This trait provides a way to efficiently compute both the quotient and remainder in a single
operation. The division truncates towards zero, matching the behavior of the / and %
operators.
Signature
pub trait DivRem
Examples
assert!(DivRem::div_rem(7_u32, 3) == (2, 1));
Trait functions
div_rem
Performs the / and the % operations, returning both the quotient and remainder.