roundToLong

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

expect fun Double.roundToLong(): Long(source)
import kotlin.math.roundToLong

fun main() {
    val values = listOf(3.6, 2.3, -1.5, -2.5)
    values.forEach { v ->
        println("$v rounded to Long = ${v.roundToLong()}")
    }
}

Source