0
0
mirror of https://github.com/florisboard/florisboard.git synced 2024-09-19 19:42:20 +02:00

Merge pull request #842 from X-yl/quick-glide-fix

Make normalizeBoxSide have a non-zero minimum longestSide
This commit is contained in:
Patrick Goldinger 2021-05-09 14:56:16 +02:00 committed by GitHub
commit 636d329dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -526,7 +526,7 @@ class StatisticalGlideTypingClassifier : GlideTypingClassifier {
val width = maxX - minX
val height = maxY - minY
val longestSide = max(width, height)
val longestSide = max(max(width, height), 0.00001f)
val centroidX = (width / 2 + minX) / longestSide
val centroidY = (height / 2 + minY) / longestSide