/ and %
operators.
Signature
Examples
Trait functions
div_rem
Performs the/ and the % operations, returning both the quotient and remainder.
/ and %
operators.
pub trait DivRem
assert!(DivRem::div_rem(7_u32, 3) == (2, 1));
/ and the % operations, returning both the quotient and remainder.
fn div_rem(lhs: T, rhs: NonZero) -> (T, T)
assert!(DivRem::div_rem(12_u32, 10) == (1, 2));
Was this page helpful?