roundToInt

Rounds this Double value to the nearest integer and converts the result to Int. Ties are rounded towards positive infinity.

expect fun Double.roundToInt(): Int(source)
import kotlin.math.roundToInt

fun main() {
    val values = listOf(3.5, 3.4, -3.5)
    values.forEach { value ->
        println("$value rounded to Int is ${value.roundToInt()}")
    }
}

Source