Loading native/jni/src/geometry_utils.h +3 −12 Original line number Diff line number Diff line Loading @@ -64,17 +64,8 @@ static inline float getAngleDiff(float a1, float a2) { return diff; } // static float pointToLineSegSquaredDistanceFloat( // float x, float y, float x1, float y1, float x2, float y2) { // float A = x - x1; // float B = y - y1; // float C = x2 - x1; // float D = y2 - y1; // return fabsf(A * D - C * B) / sqrtf(C * C + D * D); // } static inline float pointToLineSegSquaredDistanceFloat( float x, float y, float x1, float y1, float x2, float y2) { float x, float y, float x1, float y1, float x2, float y2, bool extend) { const float ray1x = x - x1; const float ray1y = y - y1; const float ray2x = x2 - x1; Loading @@ -86,10 +77,10 @@ static inline float pointToLineSegSquaredDistanceFloat( float projectionX; float projectionY; if (projectionLengthSqr < 0.0f) { if (!extend && projectionLengthSqr < 0.0f) { projectionX = x1; projectionY = y1; } else if (projectionLengthSqr > 1.0f) { } else if (!extend && projectionLengthSqr > 1.0f) { projectionX = x2; projectionY = y2; } else { Loading native/jni/src/proximity_info_state.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -504,7 +504,7 @@ int32_t ProximityInfoState::getAllPossibleChars( if (index >= mInputXs.size()) { return filterSize; } int i = filterSize; int newFilterSize = filterSize; for (int j = 0; j < mProximityInfo->getKeyCount(); ++j) { if (mNearKeysVector[index].test(j)) { const int32_t keyCodePoint = mProximityInfo->getCodePointOf(j); Loading @@ -517,11 +517,11 @@ int32_t ProximityInfoState::getAllPossibleChars( } } if (insert) { filter[i++] = keyCodePoint; filter[newFilterSize++] = keyCodePoint; } } } return i; return newFilterSize; } float ProximityInfoState::getAveragePointDuration() const { Loading Loading
native/jni/src/geometry_utils.h +3 −12 Original line number Diff line number Diff line Loading @@ -64,17 +64,8 @@ static inline float getAngleDiff(float a1, float a2) { return diff; } // static float pointToLineSegSquaredDistanceFloat( // float x, float y, float x1, float y1, float x2, float y2) { // float A = x - x1; // float B = y - y1; // float C = x2 - x1; // float D = y2 - y1; // return fabsf(A * D - C * B) / sqrtf(C * C + D * D); // } static inline float pointToLineSegSquaredDistanceFloat( float x, float y, float x1, float y1, float x2, float y2) { float x, float y, float x1, float y1, float x2, float y2, bool extend) { const float ray1x = x - x1; const float ray1y = y - y1; const float ray2x = x2 - x1; Loading @@ -86,10 +77,10 @@ static inline float pointToLineSegSquaredDistanceFloat( float projectionX; float projectionY; if (projectionLengthSqr < 0.0f) { if (!extend && projectionLengthSqr < 0.0f) { projectionX = x1; projectionY = y1; } else if (projectionLengthSqr > 1.0f) { } else if (!extend && projectionLengthSqr > 1.0f) { projectionX = x2; projectionY = y2; } else { Loading
native/jni/src/proximity_info_state.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -504,7 +504,7 @@ int32_t ProximityInfoState::getAllPossibleChars( if (index >= mInputXs.size()) { return filterSize; } int i = filterSize; int newFilterSize = filterSize; for (int j = 0; j < mProximityInfo->getKeyCount(); ++j) { if (mNearKeysVector[index].test(j)) { const int32_t keyCodePoint = mProximityInfo->getCodePointOf(j); Loading @@ -517,11 +517,11 @@ int32_t ProximityInfoState::getAllPossibleChars( } } if (insert) { filter[i++] = keyCodePoint; filter[newFilterSize++] = keyCodePoint; } } } return i; return newFilterSize; } float ProximityInfoState::getAveragePointDuration() const { Loading