diff options
author | Chris Robinson <[email protected]> | 2019-03-27 11:52:35 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-03-27 11:52:35 -0700 |
commit | e7bfe1ebd00fe01514f590f4b143c676034fcf6e (patch) | |
tree | 2265892914d5d96248a04ad8b1f096eba66ba9c0 /utils/makemhr | |
parent | 095a0b9bebf8395a00faa85d7acc5e43ef03640d (diff) |
Simplify applying the field magnitude factor
Diffstat (limited to 'utils/makemhr')
-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; } } } |