withSign

expect fun Double.withSign(sign: Double): Double(source)
expect fun Float.withSign(sign: Float): Float(source)

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

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

Since Kotlin

1.2

expect fun Double.withSign(sign: Int): Double(source)
expect fun Float.withSign(sign: Int): Float(source)

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

Since Kotlin

1.2
actual inline fun Double.withSign(sign: Double): Double(source)
actual inline fun Float.withSign(sign: Float): Float(source)

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

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

Since Kotlin

1.2

actual inline fun Double.withSign(sign: Int): Double(source)
actual inline fun Float.withSign(sign: Int): Float(source)

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

Since Kotlin

1.2
actual fun Double.withSign(sign: Double): Double
actual inline fun Float.withSign(sign: Float): Float

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

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

Since Kotlin

1.2

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

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

Since Kotlin

1.2
actual external fun Double.withSign(sign: Double): Double
actual external fun Float.withSign(sign: Float): Float

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

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

Since Kotlin

1.2

actual fun Double.withSign(sign: Int): Double
actual fun Float.withSign(sign: Int): Float

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

Since Kotlin

1.2