lotuswordpro/source/filter/lwpsdwrect.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit d0055ac076c61d24c505c2ffa4f99e36c97b1266 Author: VaibhavMalik4187 <vaibhavmalik2...@gmail.com> AuthorDate: Sat Mar 19 16:32:13 2022 +0530 Commit: Hossein <hoss...@libreoffice.org> CommitDate: Wed Mar 23 20:52:13 2022 +0100 tdf#147906 Use std::hypot for Pythagorean addition Change-Id: I7813b9929771858d33e951e50e6de7893fe19085 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131684 Tested-by: Jenkins Reviewed-by: Hossein <hoss...@libreoffice.org> diff --git a/lotuswordpro/source/filter/lwpsdwrect.cxx b/lotuswordpro/source/filter/lwpsdwrect.cxx index 3ec27ccfbc42..3bc2704ac76f 100644 --- a/lotuswordpro/source/filter/lwpsdwrect.cxx +++ b/lotuswordpro/source/filter/lwpsdwrect.cxx @@ -170,7 +170,7 @@ double SdwRectangle::GetRotationAngle() const double SdwRectangle::CalcDistBetween2Points(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) { - return sqrt(static_cast<double>((nX1-nX2)*(nX1-nX2) + (nY1-nY2)*(nY1-nY2))); + return std::hypot(nX1 - nX2, nY1 - nY2); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */