diff --git a/cpp/core/src/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp b/cpp/core/src/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp index 6ebeb3696..3ab84c782 100644 --- a/cpp/core/src/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp +++ b/cpp/core/src/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp @@ -15,7 +15,7 @@ */ #include -#include +#include #include #include #include @@ -171,7 +171,7 @@ std::vector > > MultiFinderPatternFinder::selectB Ref p2 = possibleCenters[i2]; // Compare the expected module sizes; if they are really off, skip float vModSize12 = (p1->getEstimatedModuleSize() - p2->getEstimatedModuleSize()) / std::min(p1->getEstimatedModuleSize(), p2->getEstimatedModuleSize()); - float vModSize12A = fabs(p1->getEstimatedModuleSize() - p2->getEstimatedModuleSize()); + float vModSize12A = abs(p1->getEstimatedModuleSize() - p2->getEstimatedModuleSize()); if (vModSize12A > DIFF_MODSIZE_CUTOFF && vModSize12 >= DIFF_MODSIZE_CUTOFF_PERCENT) { // break, since elements are ordered by the module size deviation there cannot be // any more interesting elements for the given p1. @@ -181,7 +181,7 @@ std::vector > > MultiFinderPatternFinder::selectB Ref p3 = possibleCenters[i3]; // Compare the expected module sizes; if they are really off, skip float vModSize23 = (p2->getEstimatedModuleSize() - p3->getEstimatedModuleSize()) / std::min(p2->getEstimatedModuleSize(), p3->getEstimatedModuleSize()); - float vModSize23A = fabs(p2->getEstimatedModuleSize() - p3->getEstimatedModuleSize()); + float vModSize23A = abs(p2->getEstimatedModuleSize() - p3->getEstimatedModuleSize()); if (vModSize23A > DIFF_MODSIZE_CUTOFF && vModSize23 >= DIFF_MODSIZE_CUTOFF_PERCENT) { // break, since elements are ordered by the module size deviation there cannot be // any more interesting elements for the given p1. @@ -203,14 +203,14 @@ std::vector > > MultiFinderPatternFinder::selectB continue; } // Calculate the difference of the edge lengths in percent - float vABBC = fabs((dA - dB) / std::min(dA, dB)); + float vABBC = abs((dA - dB) / std::min(dA, dB)); if (vABBC >= 0.1f) { continue; } // Calculate the diagonal length by assuming a 90° angle at topleft float dCpy = (float) sqrt(dA * dA + dB * dB); // Compare to the real distance in % - float vPyC = fabs((dC - dCpy) / std::min(dC, dCpy)); + float vPyC = abs((dC - dCpy) / std::min(dC, dCpy)); if (vPyC >= 0.1f) { continue; }