Trait dashu_base::ring::DivRemEuclid
source · [−]pub trait DivRemEuclid<Rhs = Self> {
type OutputDiv;
type OutputRem;
fn div_rem_euclid(self, rhs: Rhs) -> (Self::OutputDiv, Self::OutputRem);
}Expand description
Compute Euclidean quotient and remainder at the same time.
Example
use dashu_base::DivRemEuclid;
assert_eq!((-23).div_rem_euclid(10), (-3, 7));