← Docs
kotlin-stdlib / kotlin / Float / toLong

toLong

Common
JVM
JS
Native
1.0
fun toLong ( ) : Long
(Common source) (Native source)

Converts this Float value to Long .

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

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .