File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1740,7 +1740,7 @@ $EndFeature, "
17401740 concat!( "Calculates the quotient of Euclidean division of `self` by `rhs`.
17411741
17421742This 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`.
17441744
17451745In other words, the result is `self / rhs` rounded to the integer `n`
17461746such that `self >= n * rhs`.
@@ -1781,7 +1781,9 @@ assert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2
17811781 doc_comment! {
17821782 concat!( "Calculates the least nonnegative remainder of `self (mod rhs)`.
17831783
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)`.
17851787
17861788# Panics
17871789
You can’t perform that action at this time.
0 commit comments