summaryrefslogtreecommitdiff
path: root/sc/source/core/tool
diff options
context:
space:
mode:
authorOmkarAcharekar <omkaracharekar12@gmail.com>2022-11-10 13:56:39 +0530
committerHossein <hossein@libreoffice.org>2022-11-19 00:48:16 +0100
commitbcf333309f9a9bde21aac1302cbead2b23822458 (patch)
treeba371dc8a3a6f6467faca5e71b13e0d0f4e48b87 /sc/source/core/tool
parentf4b5ecb54dbe216677b3eeb9a03f63da7df8223f (diff)
tdf#147906 Use std::hypot for Pythagorean addition
Change-Id: I19ecfe80e9a927c14db2680188baa54cb4911d4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142535 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'sc/source/core/tool')
-rw-r--r--sc/source/core/tool/interpr3.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 962f61970ee6..f55fc1636959 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -5096,7 +5096,7 @@ static void lcl_convertToPolar(std::vector<double>& rCmplxArray, double fMinMag)
{
fR = rCmplxArray[nIdx];
fI = rCmplxArray[nPoints+nIdx];
- fMag = sqrt(fR*fR + fI*fI);
+ fMag = std::hypot(fR, fI);
if (fMag < fMinMag)
{
fMag = 0.0;