From d95b85e2c3d84c5c3b235d1a07b49af421e0bae2 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Tue, 19 Mar 2024 16:02:15 +0300 Subject: [PATCH] Backport StoT fix from @thliebig --- src/math/matrix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/math/matrix.cpp b/src/math/matrix.cpp index 8ff178e6..7b68fea6 100644 --- a/src/math/matrix.cpp +++ b/src/math/matrix.cpp @@ -1933,7 +1933,7 @@ matrix twoport (matrix m, char in, char out) { res.set (0, 0, m (0, 1) - m (0, 0) * m (1, 1) / d); res.set (0, 1, m (0, 0) / d); res.set (1, 0, -m (1, 1) / d); - res.set (0, 1, 1.0 / d); + res.set (1, 1, 1.0 / d); break; case 'A': // S to A res = stoa (m); @@ -1959,7 +1959,7 @@ matrix twoport (matrix m, char in, char out) { res.set (0, 0, m (0, 1) / d); res.set (0, 1, m (0, 0) - m (0, 1) * m (1, 0) / d); res.set (1, 0, 1.0 / d); - res.set (0, 1, -m (1, 0) / d); + res.set (1, 1, -m (1, 0) / d); break; case 'T': // T to T res = m;