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:
commit
636d329dba
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user