summaryrefslogtreecommitdiff
path: root/libs/input/Input.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r--libs/input/Input.cpp3
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);