floor
Platform and version requirements: JVM (1.2), JS (1.2), Native (1.2)
fun floor(x: Double): Double
Rounds the given value x to an integer towards negative infinity.
Return
the largest double value that is smaller than or equal to the given value x and is a mathematical integer.
Special cases:
-
floor(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.
Platform and version requirements: JVM (1.2), JS (1.2), Native (1.2)
fun floor(x: Float): Float
Rounds the given value x to an integer towards negative infinity.
Return
the largest Float value that is smaller than or equal to the given value x and is a mathematical integer.
Special cases:
-
floor(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.