aboutsummaryrefslogtreecommitdiffstats
path: root/utils/makemhr/makemhr.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-10-26 00:50:25 -0700
committerChris Robinson <[email protected]>2023-10-26 00:50:25 -0700
commitb6aa73b26004afe63d83097f2f91ecda9bc25cb9 (patch)
treee58c5ed8e7b8b8f82f8a003aae99b17582a2e247 /utils/makemhr/makemhr.cpp
parent5f8136680e168d585c27fe4dda1841a06e2ce55e (diff)
Slightly simplify calculating the minimum phase output
Diffstat (limited to 'utils/makemhr/makemhr.cpp')
-rw-r--r--utils/makemhr/makemhr.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/utils/makemhr/makemhr.cpp b/utils/makemhr/makemhr.cpp
index ae301dc3..98e1b73f 100644
--- a/utils/makemhr/makemhr.cpp
+++ b/utils/makemhr/makemhr.cpp
@@ -297,10 +297,7 @@ static void MinimumPhase(const uint n, double *mags, complex_d *out)
// Remove any DC offset the filter has.
mags[0] = EPSILON;
for(i = 0;i < n;i++)
- {
- auto a = std::exp(complex_d{0.0, out[i].imag()});
- out[i] = a * mags[i];
- }
+ out[i] = std::polar(mags[i], out[i].imag());
}