Little stability improvement of doubletap scale.

This commit is contained in:
GaidamakUA 2016-01-28 17:34:12 +02:00
parent 1359d92a9c
commit 05ad12e3d5

View file

@ -108,8 +108,8 @@ public class DoubleTapScaleDetector {
int deltaYDown = (int) firstDown.getY() - (int) secondDown.getY();
int squaredDown = deltaXDown * deltaXDown + deltaYDown * deltaYDown;
int deltaXUp = (int) firstDown.getX() - (int) secondDown.getX();
int deltaYUp = (int) firstDown.getY() - (int) secondDown.getY();
int deltaXUp = (int) firstUp.getX() - (int) secondDown.getX();
int deltaYUp = (int) firstUp.getY() - (int) secondDown.getY();
int squaredUp = deltaXUp * deltaXUp + deltaYUp * deltaYUp;
return squaredDown < mDoubleTapSlopSquare && squaredUp < mDoubleTapSlopSquare;