am 4d75fe9b: FIX: Wrong way to gesture speed calculation.
* commit '4d75fe9bcaaf63d61bdafea3ad88ea22ebe54430': FIX: Wrong way to gesture speed calculation.main
commit
358f3caa9a
|
@ -179,6 +179,8 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
|
||||||
duration = times[index] - times[index - 1];
|
duration = times[index] - times[index - 1];
|
||||||
} else if (0 < index && index < inputSize - 1) {
|
} else if (0 < index && index < inputSize - 1) {
|
||||||
length = getDistanceInt(xCoordinates[index - 1], yCoordinates[index - 1],
|
length = getDistanceInt(xCoordinates[index - 1], yCoordinates[index - 1],
|
||||||
|
xCoordinates[index], yCoordinates[index])
|
||||||
|
+ getDistanceInt(xCoordinates[index], yCoordinates[index],
|
||||||
xCoordinates[index + 1], yCoordinates[index + 1]);
|
xCoordinates[index + 1], yCoordinates[index + 1]);
|
||||||
duration = times[index + 1] - times[index - 1];
|
duration = times[index + 1] - times[index - 1];
|
||||||
} else {
|
} else {
|
||||||
|
@ -509,7 +511,7 @@ float ProximityInfoState::getPointToKeyLength(const int inputIndex, const int co
|
||||||
return min(mDistanceCache[index] * scale, mMaxPointToKeyLength);
|
return min(mDistanceCache[index] * scale, mMaxPointToKeyLength);
|
||||||
}
|
}
|
||||||
if (isSkippableChar(codePoint)) {
|
if (isSkippableChar(codePoint)) {
|
||||||
return 0;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
// If the char is not a key on the keyboard then return the max length.
|
// If the char is not a key on the keyboard then return the max length.
|
||||||
return MAX_POINT_TO_KEY_LENGTH;
|
return MAX_POINT_TO_KEY_LENGTH;
|
||||||
|
|
Loading…
Reference in New Issue