mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
Kotlin 2.0 migration
This commit is contained in:
@@ -72,7 +72,7 @@ class UIItemSpinner(
|
||||
|
||||
val intermediate = (0..(maxd - mind).div(stepd).ceilToInt()).map {
|
||||
it to ((mind + stepd * it) - id).absoluteValue
|
||||
}.minBy { it.second }.first * stepd + mind
|
||||
}.minByOrNull { it.second }!!.first * stepd + mind
|
||||
initialValue = when (initialValue.javaClass.simpleName) {
|
||||
"Integer" -> intermediate.toInt()
|
||||
else -> intermediate
|
||||
|
||||
Reference in New Issue
Block a user