takeHighestOneBit

Returns a number having a single bit set in the position of the most significant set bit of this Byte number, or zero, if this number is zero.

Since Kotlin

1.4

Returns a number having a single bit set in the position of the most significant set bit of this Short number, or zero, if this number is zero.

Since Kotlin

1.4

Returns a number having a single bit set in the position of the most significant set bit of this UInt number, or zero, if this number is zero.

Since Kotlin

1.5

Returns a number having a single bit set in the position of the most significant set bit of this ULong number, or zero, if this number is zero.

Since Kotlin

1.5

Returns a number having a single bit set in the position of the most significant set bit of this UByte number, or zero, if this number is zero.

Since Kotlin

1.5

Returns a number having a single bit set in the position of the most significant set bit of this UShort number, or zero, if this number is zero.

Since Kotlin

1.5

Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.

Since Kotlin

1.4

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin

1.4

Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.

Since Kotlin

1.4

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin

1.4
actual inline fun Int.takeHighestOneBit(): Int(source)

Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.

Since Kotlin

1.4

actual inline fun Long.takeHighestOneBit(): Long(source)

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin

1.4

Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.

Since Kotlin

1.4

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin

1.4

Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.

Since Kotlin

1.8

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin

1.8

Returns a number having a single bit set in the position of the most significant set bit of this Int number, or zero, if this number is zero.

Since Kotlin

1.8

Returns a number having a single bit set in the position of the most significant set bit of this Long number, or zero, if this number is zero.

Since Kotlin

1.8