round

Rounds the given value x towards the closest integer with ties rounded towards even integer.

expect fun round(x: Double): Double(source)
import kotlin.math.round

fun main() {
    val values = listOf(2.5, 3.5, 1.2, 4.8)

    for (v in values) {
        println("round($v) = ${round(v)}")
    }
}

Source