Module malachite_base::num::arithmetic::wrapping_sub
source · Expand description
WrappingSub
and WrappingSubAssign
,
traits for subtracting two numbers and wrapping at the boundary of the type.
§wrapping_sub_assign
use malachite_base::num::arithmetic::traits::WrappingSubAssign;
let mut x = 456u16;
x.wrapping_sub_assign(123);
assert_eq!(x, 333);
let mut x = 123u16;
x.wrapping_sub_assign(456);
assert_eq!(x, 65203);