toInt

expect open override fun toInt(): Int(source)

Converts this Float value to Int.

The fractional part, if any, is rounded down towards zero. 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.

Since Kotlin

1.0
actual open override fun toInt(): Int(source)

Converts this Float value to Int.

The fractional part, if any, is rounded down towards zero. 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.

Since Kotlin

1.1
open override fun toInt(): Int(source)

Converts this Float value to Int.

The fractional part, if any, is rounded down towards zero. 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.

Since Kotlin

1.0
actual open external override fun toInt(): Int(source)

Converts this Float value to Int.

The fractional part, if any, is rounded down towards zero. 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.

Since Kotlin

1.3
actual open override fun toInt(): Int(source)

Converts this Float value to Int.

The fractional part, if any, is rounded down towards zero. 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.

Since Kotlin

1.8
actual open override fun toInt(): Int(source)

Converts this Float value to Int.

The fractional part, if any, is rounded down towards zero. 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.

Since Kotlin

1.8