svx/source/engine3d/view3d.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit 5b18eebc2c95321ce7e6edf10f4df81557382a48 Author: Bogdan B <buzea.bog...@libreoffice.org> AuthorDate: Thu Nov 24 21:06:35 2022 +0100 Commit: Hossein <hoss...@libreoffice.org> CommitDate: Sat Nov 26 23:39:26 2022 +0100 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 <hoss...@libreoffice.org> 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) {