diff options
author | 2012-09-24 21:10:35 -0700 | |
---|---|---|
committer | 2012-09-24 21:10:35 -0700 | |
commit | 67b211fee2e92649cae7cd5214da9b3d778951f5 (patch) | |
tree | b2a79cef22eb9d98be0c086ac52a143758dbda32 | |
parent | 9a565f5afd0dfb99bd78a48b63bed9c4946680fa (diff) | |
parent | 358f3caa9afd5c90abc1930986e0a2216396f2a0 (diff) | |
download | latinime-67b211fee2e92649cae7cd5214da9b3d778951f5.tar.gz latinime-67b211fee2e92649cae7cd5214da9b3d778951f5.tar.xz latinime-67b211fee2e92649cae7cd5214da9b3d778951f5.zip |
am 358f3caa: am 4d75fe9b: FIX: Wrong way to gesture speed calculation.
* commit '358f3caa9afd5c90abc1930986e0a2216396f2a0':
FIX: Wrong way to gesture speed calculation.
-rw-r--r-- | native/jni/src/proximity_info_state.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/native/jni/src/proximity_info_state.cpp b/native/jni/src/proximity_info_state.cpp index fbca7200e..392ec8194 100644 --- a/native/jni/src/proximity_info_state.cpp +++ b/native/jni/src/proximity_info_state.cpp @@ -179,7 +179,9 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi duration = times[index] - times[index - 1]; } else if (0 < index && index < inputSize - 1) { length = getDistanceInt(xCoordinates[index - 1], yCoordinates[index - 1], - xCoordinates[index + 1], yCoordinates[index + 1]); + xCoordinates[index], yCoordinates[index]) + + getDistanceInt(xCoordinates[index], yCoordinates[index], + xCoordinates[index + 1], yCoordinates[index + 1]); duration = times[index + 1] - times[index - 1]; } else { length = 0; @@ -509,7 +511,7 @@ float ProximityInfoState::getPointToKeyLength(const int inputIndex, const int co return min(mDistanceCache[index] * scale, mMaxPointToKeyLength); } if (isSkippableChar(codePoint)) { - return 0; + return 0.0f; } // If the char is not a key on the keyboard then return the max length. return MAX_POINT_TO_KEY_LENGTH; |