Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Schultzer committed Mar 30, 2019
1 parent 72dce6c commit ed65a51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ impl<T: Clone + Num> Sub<Complex<T>> for Complex<T> {

forward_all_binop!(impl Mul, mul);

// (a + i b) * (c + i d) + (a + i b) + (c + i d) == (a*c - b*d) + i (a*d + b*c) + i (b + d)
// (a + i b) * (c + i d) == (a*c - b*d) + i (a*d + b*c)
impl<T: Clone + Num> Mul<Complex<T>> for Complex<T> {
type Output = Self;

Expand All @@ -602,7 +602,7 @@ impl<T: Clone + Num> Mul<Complex<T>> for Complex<T> {
}
}

// (a + i b) - (c + i d) == (a - c) + i (b - d)
// (a + i b) * (c + i d) + (e + i f) == ((a*c + e) - b*d) + i (a*d + (b*c + f))
impl<T: Clone + Num + MulAdd<Output = T>> MulAdd<Complex<T>> for Complex<T> {
type Output = Complex<T>;

Expand Down

0 comments on commit ed65a51

Please sign in to comment.