W3cubDocs

/Kotlin

toInt

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.3)
fun toInt(): Int

Converts this Float value to Int.

The fractional part, if any, is rounded down. Returns zero if this Float value is NaN, Int.MIN_VALUE if it's less than Int.MIN_VALUE, Int.MAX_VALUE if it's bigger than Int.MAX_VALUE.

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/to-int.html