fun truncate(x: Double): Double
fun truncate(x: Float): Float
Rounds the given value x to an integer towards zero.
Return
the value x having its fractional part truncated.
Special cases:
truncate(x)
x
NaN
+Inf
-Inf
© 2010–2019 JetBrains s.r.o.Licensed under the Apache License, Version 2.0. https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.math/truncate.html