Skip to content

Commit

Permalink
improve complex mod
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Jun 11, 2024
1 parent 5c7ca04 commit f1330aa
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/complex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,7 @@ impl Div<Complex> for f64 {
impl Rem for Complex {
type Output = Self;
fn rem(self, rhs: Self) -> Self::Output {
Self {
re: self.re.rem_euclid(rhs.re),
im: self.im.rem_euclid(rhs.im),
}
self - (self / rhs).floor() * rhs
}
}

Expand Down

0 comments on commit f1330aa

Please sign in to comment.