aboutsummaryrefslogtreecommitdiffstats
path: root/utils/makemhr/makemhr.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-27 11:52:35 -0700
committerChris Robinson <[email protected]>2019-03-27 11:52:35 -0700
commite7bfe1ebd00fe01514f590f4b143c676034fcf6e (patch)
tree2265892914d5d96248a04ad8b1f096eba66ba9c0 /utils/makemhr/makemhr.cpp
parent095a0b9bebf8395a00faa85d7acc5e43ef03640d (diff)
Simplify applying the field magnitude factor
Diffstat (limited to 'utils/makemhr/makemhr.cpp')
-rw-r--r--utils/makemhr/makemhr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/makemhr/makemhr.cpp b/utils/makemhr/makemhr.cpp
index 4406384a..f6e28937 100644
--- a/utils/makemhr/makemhr.cpp
+++ b/utils/makemhr/makemhr.cpp
@@ -798,7 +798,7 @@ static void BalanceFieldMagnitudes(const HrirDataT *hData, const uint channels,
for(fi = 0;fi < hData->mFdCount;fi++)
{
- maxMags[fi] /= maxMag;
+ const double magFactor{maxMag / maxMags[fi]};
for(ei = hData->mFds[fi].mEvStart;ei < hData->mFds[fi].mEvCount;ei++)
{
@@ -808,7 +808,7 @@ static void BalanceFieldMagnitudes(const HrirDataT *hData, const uint channels,
for(ti = 0;ti < channels;ti++)
{
for(i = 0;i < m;i++)
- azd->mIrs[ti][i] /= maxMags[fi];
+ azd->mIrs[ti][i] *= magFactor;
}
}
}