forked from amazingfate/loongoffice
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>
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user