W3cubDocs

/Kotlin

sqrt

inline fun sqrt(x: Double): Double

Platform and version requirements: Kotlin 1.2

inline fun sqrt(x: Float): Float

Platform and version requirements: Kotlin 1.2

Computes the positive square root of the value x.

Special cases:

  • sqrt(x) is NaN when x < 0 or x is NaN

© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.math/sqrt.html