Open lukyxu opened 2 years ago
No particular reason, just that nobody has wanted them yet.
I'm not sure it's very useful to have these in generic contexts -- the only input that actually wraps is signed MIN / -1
. Division by zero still panics, at least. But if you have a use case, I wouldn't mind a pull request for new traits.
There exist traits for wrapping_add, wrapping_sub, wrapping_mul, wrapping_shl, wrapping_shr and wrapping_neg. Is there a reason why there isn't a trait for wrapping div and wrapping rem?