fixup! Refactoring qf_cauer and adding tee types

This commit is contained in:
Julien Colafrancesco 2024-05-10 09:30:00 +02:00
parent d0ca291de1
commit 7fe6b73933
2 changed files with 4 additions and 4 deletions

View File

@ -128,7 +128,7 @@ QString filter::num2str(qf_float num) {
num /= pow(10.0, (qf_float)(3 * expo));
}
}
QString str = QString::number(num);
QString str = QString::number((double)num);
if (c) {
str.append(c);
}
@ -145,7 +145,7 @@ QString filter::to_qucs() {
compos += QString("<Pac P1 1 %1 290 18 -26 0 1 \"1\" 1 \"%2 Ohm\" 1 \"0 "
"dBm\" 0 \"1 GHz\" 0>\n")
.arg(x)
.arg(imp_);
.arg((double)imp_);
compos += QString("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
wires += QString("<0 200 %1 200 \"\" 0 0 0>\n").arg(space / 2);
wires += QString("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x);
@ -264,7 +264,7 @@ QString filter::to_qucs() {
compos += QString("<Pac P2 1 %1 290 18 -26 0 1 \"2\" 1 \"%2 Ohm\" 1 \"0 "
"dBm\" 0 \"1 GHz\" 0>\n")
.arg(x)
.arg(imp_);
.arg((double)imp_);
compos += QString("<GND * 1 %1 320 0 0 0 0>\n").arg(x);
wires += QString("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x);

View File

@ -2,7 +2,7 @@
#define QF_MATH
namespace qf {
typedef double qf_float;
typedef long double qf_float;
static const double pi = 3.1415926535897932384626433832795029; /* pi */
static const double one_over_pi = 0.3183098861837906715377675267450287; /* 1/pi */
static const double ln2 = 0.6931471805599453094172321214581766; /* log_e(2) */