W3cubDocs

/Kotlin

withSign

inline fun Double.withSign(sign: Double): Double

Platform and version requirements: Kotlin 1.2

inline fun Float.withSign(sign: Float): Float

Platform and version requirements: Kotlin 1.2

Returns this value with the sign bit same as of the sign value.

If sign is NaN the sign of the result is undefined.

inline fun Double.withSign(sign: Int): Double

Platform and version requirements: Kotlin 1.2

inline fun Float.withSign(sign: Int): Float

Platform and version requirements: Kotlin 1.2

Returns this value with the sign bit same as of the sign value.

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