diff options
author | pragat-pandya <pragat.pandya@gmail.com> | 2022-03-29 16:25:15 +0530 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-03-31 13:51:34 +0200 |
commit | a31aadb1ef7dfdd4ae76a15707ab51a82c95d868 (patch) | |
tree | 0cf5626a67b7c3a18b546c3e9d4d2c96b62dfbbf /dbaccess/source | |
parent | 9f041e7678521074b09b20f4088996c86bea5cd0 (diff) |
tdf#147906 Use std::hypot for Pythagorean addition
Change-Id: I38166d36e9e8518ab86ded7ab630a35f3a0c39d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132268
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/querydesign/ConnectionLine.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index 96086d60b682..77a67004e995 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -307,7 +307,7 @@ static double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Poin { Point v(p2 - p1); Point w(pM - p1); - double a = sqrt(static_cast<double>(v.X()*v.X() + v.Y()*v.Y())); + double a = std::hypot(v.X(), v.Y()); double l = (v.X() * w.Y() - v.Y() * w.X()) / a; double a2 = w.X()*v.X()+w.Y()*v.Y(); a = a2 / (a * a); |