diff options
author | VaibhavMalik4187 <vaibhavmalik2018@gmail.com> | 2022-03-19 16:32:13 +0530 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-03-23 20:52:13 +0100 |
commit | d0055ac076c61d24c505c2ffa4f99e36c97b1266 (patch) | |
tree | fc7c2c378481f99e959861f3663c414b339423e9 /lotuswordpro | |
parent | 323ff2749b6be5f6ef98c6250afce4fa89e3aa1c (diff) |
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 <hossein@libreoffice.org>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpsdwrect.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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: */ |