We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9ef6c0 commit 77468cbCopy full SHA for 77468cb
src/lib.rs
@@ -335,6 +335,22 @@ pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {
335
{
336
self.clone() - self.mod_floor(other)
337
}
338
+
339
+ /// Decrements self
340
+ fn dec(&mut self)
341
+ where
342
+ Self: Clone,
343
+ {
344
+ *self = self.clone() - Self::one()
345
+ }
346
347
+ /// Increments self
348
+ fn inc(&mut self)
349
350
351
352
+ *self = self.clone() + Self::one()
353
354
355
356
/// Greatest common divisor and Bézout coefficients
0 commit comments