Skip to content

Commit

Permalink
修正错误的复数乘法
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev-XYS committed Jan 13, 2017
1 parent a4ab8e1 commit 4140481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Complex-Number.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ complex operator - (const complex &x, const complex &y)

complex operator * (const complex &x, const complex &y)
{
return complex(x.re * y.re - x.im * y.im, x.re * y.re + x.im * y.im);
return complex(x.re * y.re - x.im * y.im, x.re * y.im + x.im * y.re);
}

complex operator / (const complex &x, const complex &y)
Expand Down

0 comments on commit 4140481

Please sign in to comment.