diff options
author | Yomnasalama <yomnasalama2000@gmail.com> | 2023-02-06 18:32:36 +0000 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2023-02-06 18:37:58 +0000 |
commit | 08cfcea7fef6cde9eddcfa461fe1edff99dadafe (patch) | |
tree | 547032052f4e73a1d0670098fa5ca12660c8af00 /android | |
parent | 52eba7937154a49e07360b297d5d7c396ca91903 (diff) |
tdf#147906 Use Math.hypot() for Pythagorean addition
Change-Id: I644947ca22f493bbc805c45334450db8d4b4808b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146137
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'android')
-rw-r--r-- | android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java index f1973d980e32..c0da18ff70bd 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java @@ -426,7 +426,7 @@ class JavaPanZoomController private float panDistance(MotionEvent move) { float dx = mX.panDistance(move.getX(0)); float dy = mY.panDistance(move.getY(0)); - return (float) Math.sqrt(dx * dx + dy * dy); + return (float) Math.hypot(dx , dy); } private void track(float x, float y, long time) { |