summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorBogdan B <buzea.bogdan@libreoffice.org>2022-11-24 21:06:35 +0100
committerHossein <hossein@libreoffice.org>2022-11-26 23:39:26 +0100
commit5b18eebc2c95321ce7e6edf10f4df81557382a48 (patch)
tree2e9a428694709dc1499633979cabdb231f5feeca /svx/source
parentc9807faad6a154b57a99adfdf9b02bd9e588250f (diff)
tdf#147906 used std::hypot for Pythagorean addition
Change-Id: I28f3996b777c99b771f1cbcde236b5a1a1c0f18f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143168 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/engine3d/view3d.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 18df6d5a6a98..ece5281baf63 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -843,9 +843,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1
if(bExtrude)
{
- double fW = static_cast<double>(aRect.GetWidth());
- double fH = static_cast<double>(aRect.GetHeight());
- fDepth = sqrt(fW*fW + fH*fH) / 6.0;
+ fDepth = std::hypot(aRect.GetWidth(), aRect.GetHeight()) / 6.0;
}
if(!bExtrude)
{