Skip to content

Commit

Permalink
Use magnitude to compute dB #92
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed Jun 19, 2023
1 parent 757aab9 commit d6cc945
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qucs/diagrams/marker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ void Marker::createText()
break;
}
} else {
double val = qucs::num2db(fabs(*pz),ax->Units);
double mag = sqrt(pz[0]*pz[0] + pz[1]*pz[1]);
double val = qucs::num2db(mag,ax->Units);
Text += QString::number(val,'g',Precision);
}

Expand Down

0 comments on commit d6cc945

Please sign in to comment.