Garan Jenkin
12/07/2021, 10:33 AMJohn Nichol
12/07/2021, 10:36 AMlouiscad
12/07/2021, 12:33 PMMichail Kulaga
12/07/2021, 2:35 PMSettingsDetail.kt:80
you’re using toInt()
method, which rounds up a fraction part towards zero.
For example a float number 109.999998 will be rounded up to 109.
A much better approach is to use roundToInt()
method, which rounds float numbers to closest integer - so 109.99998 will be rounded up to 110.
Usage of roundToInt()
instead of toInt()
should eliminate this problemyschimke
12/07/2021, 3:08 PMGaran Jenkin
12/07/2021, 3:12 PMMichail Kulaga
12/07/2021, 3:26 PMJohn Nichol
12/07/2021, 5:16 PMlouiscad
12/07/2021, 7:01 PMSergio Sancho
12/09/2021, 1:12 PM