diff options
author | 2019-07-25 20:04:11 +0000 | |
---|---|---|
committer | 2019-07-25 20:04:11 +0000 | |
commit | 3e068620eb010946f98a40ee7544d8162c1a09bb (patch) | |
tree | bf67f2c4a84d4208dfca249b331cfd49763eee4f /libs/input/Input.cpp | |
parent | 6157c0d90afb1873d1d15560cad795c7204fd033 (diff) | |
parent | ab0ab9c57c8fa9d8c9648734fea74ee010e28e8c (diff) |
Merge "Address comments from a previous change."
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r-- | libs/input/Input.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index 3266b0740d..dc4978b836 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -17,7 +17,6 @@ #define LOG_TAG "Input" //#define LOG_NDEBUG 0 -#include <math.h> #include <limits.h> #include <input/Input.h> @@ -434,7 +433,7 @@ void MotionEvent::transform(const float matrix[9]) { transformPoint(matrix, 0, 0, &originX, &originY); // Apply the transformation to cursor position. - if (!isnan(mXCursorPosition) && !isnan(mYCursorPosition)) { + if (isValidCursorPosition(mXCursorPosition, mYCursorPosition)) { float x = mXCursorPosition + oldXOffset; float y = mYCursorPosition + oldYOffset; transformPoint(matrix, x, y, &x, &y); |