fix(maths): fix complex mul
This commit is contained in:
parent
7a94fe932f
commit
58a0ec983d
|
@ -169,6 +169,7 @@ impl ops::Mul<GaussianRational> for GaussianRational {
|
||||||
type Output = GaussianRational;
|
type Output = GaussianRational;
|
||||||
|
|
||||||
fn mul(self, rhs: GaussianRational) -> GaussianRational {
|
fn mul(self, rhs: GaussianRational) -> GaussianRational {
|
||||||
GaussianRational::new(self.real * rhs.real - self.imaginary * self.imaginary, self.real * rhs.imaginary + self.imaginary * rhs.real)
|
GaussianRational::new(self.real * rhs.real - self.imaginary * rhs.imaginary, self.real * rhs.imaginary + self.imaginary * rhs.real)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue