floor
Rounds the given value x to an integer towards negative infinity.
expect fun floor(x: Double): Double(source)
import kotlin.math.floor
fun main() {
val values = listOf(3.7, -2.3, 5.0, -0.9)
values.forEach { v ->
val rounded = floor(v) // rounds toward negative infinity
println("floor($v) = $rounded")
}
}