rotateRight

fun Byte.rotateRight(bitCount: Int): Byte(source)

Rotates the binary representation of this Byte number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Byte.SIZE_BITS (8) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 8)

Since Kotlin

1.6

fun Short.rotateRight(bitCount: Int): Short(source)

Rotates the binary representation of this Short number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Short.SIZE_BITS (16) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 16)

Since Kotlin

1.6

inline fun UInt.rotateRight(bitCount: Int): UInt(source)

Rotates the binary representation of this UInt number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of UInt.SIZE_BITS (32) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 32)

Since Kotlin

1.6

inline fun ULong.rotateRight(bitCount: Int): ULong(source)

Rotates the binary representation of this ULong number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of ULong.SIZE_BITS (64) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 64)

Since Kotlin

1.6

inline fun UByte.rotateRight(bitCount: Int): UByte(source)

Rotates the binary representation of this UByte number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of UByte.SIZE_BITS (8) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 8)

Since Kotlin

1.6

inline fun UShort.rotateRight(bitCount: Int): UShort(source)

Rotates the binary representation of this UShort number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of UShort.SIZE_BITS (16) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 16)

Since Kotlin

1.6

expect fun Int.rotateRight(bitCount: Int): Int(source)

Rotates the binary representation of this Int number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 32)

Since Kotlin

1.6

expect fun Long.rotateRight(bitCount: Int): Long(source)

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 64)

Since Kotlin

1.6
actual fun Int.rotateRight(bitCount: Int): Int(source)

Rotates the binary representation of this Int number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 32)

Since Kotlin

1.6

actual inline fun Long.rotateRight(bitCount: Int): Long(source)

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 64)

Since Kotlin

1.6
actual inline fun Int.rotateRight(bitCount: Int): Int(source)

Rotates the binary representation of this Int number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 32)

Since Kotlin

1.6

actual inline fun Long.rotateRight(bitCount: Int): Long(source)

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 64)

Since Kotlin

1.6
actual fun Int.rotateRight(bitCount: Int): Int(source)

Rotates the binary representation of this Int number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Int.SIZE_BITS (32) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 32)

Since Kotlin

1.6

actual inline fun Long.rotateRight(bitCount: Int): Long(source)

Rotates the binary representation of this Long number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Rotating the number right by a negative bit count is the same as rotating it left by the negated bit count: number.rotateRight(-n) == number.rotateLeft(n)

Rotating by a multiple of Long.SIZE_BITS (64) returns the same number, or more generally number.rotateRight(n) == number.rotateRight(n % 64)

Since Kotlin

1.6