File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1740,7 +1740,7 @@ $EndFeature, "
1740
1740
concat!( "Calculates the quotient of Euclidean division of `self` by `rhs`.
1741
1741
1742
1742
This computes the integer `n` such that `self = n * rhs + self.rem_euclid(rhs)`,
1743
- with the `0 <= self.rem_euclid(rhs) < rhs`.
1743
+ with `0 <= self.rem_euclid(rhs) < rhs`.
1744
1744
1745
1745
In other words, the result is `self / rhs` rounded to the integer `n`
1746
1746
such that `self >= n * rhs`.
@@ -1781,7 +1781,9 @@ assert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2
1781
1781
doc_comment! {
1782
1782
concat!( "Calculates the least nonnegative remainder of `self (mod rhs)`.
1783
1783
1784
- This is done as if by the Euclidean division algorithm.
1784
+ This is done as if by the Euclidean division algorithm -- given
1785
+ `r = self.rem_euclid(rhs)`, `self = rhs * self.div_euclid(rhs) + r`, and
1786
+ `0 <= r < abs(rhs)`.
1785
1787
1786
1788
# Panics
1787
1789
You can’t perform that action at this time.
0 commit comments