Module malachite_base::num::arithmetic::wrapping_div
source · Expand description
WrappingDiv
and WrappingDivAssign
,
traits for dividing two numbers and wrapping at the boundary of the type.
§wrapping_div_assign
use malachite_base::num::arithmetic::traits::WrappingDivAssign;
let mut x = 100u16;
x.wrapping_div_assign(3);
assert_eq!(x, 33);
let mut x = -128i8;
x.wrapping_div_assign(-1);
assert_eq!(x, -128);