diff options
Diffstat (limited to 'utils/makemhr/makemhr.cpp')
-rw-r--r-- | utils/makemhr/makemhr.cpp | 4 |
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; } } } |