ULong

value class ULong : Comparable<ULong>

Types

Companion
Link copied to clipboard
object Companion

Functions

and
Link copied to clipboard
infix inline fun and(other: ULong): ULong

Performs a bitwise AND operation between the two values.

compareTo
Link copied to clipboard
inline operator fun compareTo(other: UByte): Int
inline operator fun compareTo(other: UInt): Int
open inline operator override fun compareTo(other: ULong): Int
inline operator fun compareTo(other: UShort): Int

Compares this value with the specified value for order. Returns zero if this value is equal to the specified other value, a negative number if it's less than other, or a positive number if it's greater than other.

dec
Link copied to clipboard
inline operator fun dec(): ULong

Decrements this value.

div
Link copied to clipboard
inline operator fun div(other: UByte): ULong
inline operator fun div(other: UInt): ULong
inline operator fun div(other: ULong): ULong
inline operator fun div(other: UShort): ULong

Divides this value by the other value, truncating the result to an integer that is closer to zero.

floorDiv
Link copied to clipboard
inline fun floorDiv(other: UByte): ULong
inline fun floorDiv(other: UInt): ULong
inline fun floorDiv(other: ULong): ULong
inline fun floorDiv(other: UShort): ULong

Divides this value by the other value, flooring the result to an integer that is closer to negative infinity.

inc
Link copied to clipboard
inline operator fun inc(): ULong

Increments this value.

inv
Link copied to clipboard
inline fun inv(): ULong

Inverts the bits in this value.

minus
Link copied to clipboard
inline operator fun minus(other: UByte): ULong
inline operator fun minus(other: UInt): ULong
inline operator fun minus(other: ULong): ULong
inline operator fun minus(other: UShort): ULong

Subtracts the other value from this value.

mod
Link copied to clipboard
inline fun mod(other: UByte): UByte
inline fun mod(other: UInt): UInt
inline fun mod(other: ULong): ULong
inline fun mod(other: UShort): UShort

Calculates the remainder of flooring division of this value by the other value.

or
Link copied to clipboard
infix inline fun or(other: ULong): ULong

Performs a bitwise OR operation between the two values.

plus
Link copied to clipboard
inline operator fun plus(other: UByte): ULong
inline operator fun plus(other: UInt): ULong
inline operator fun plus(other: ULong): ULong
inline operator fun plus(other: UShort): ULong

Adds the other value to this value.

rangeTo
Link copied to clipboard
inline operator fun rangeTo(other: ULong): ULongRange

Creates a range from this value to the specified other value.

rem
Link copied to clipboard
inline operator fun rem(other: UByte): ULong
inline operator fun rem(other: UInt): ULong
inline operator fun rem(other: ULong): ULong
inline operator fun rem(other: UShort): ULong

Calculates the remainder of truncating division of this value by the other value.

shl
Link copied to clipboard
infix inline fun shl(bitCount: Int): ULong

Shifts this value left by the bitCount number of bits.

shr
Link copied to clipboard
infix inline fun shr(bitCount: Int): ULong

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

times
Link copied to clipboard
inline operator fun times(other: UByte): ULong
inline operator fun times(other: UInt): ULong
inline operator fun times(other: ULong): ULong
inline operator fun times(other: UShort): ULong

Multiplies this value by the other value.

toByte
Link copied to clipboard
inline fun toByte(): Byte

Converts this ULong value to Byte.

toDouble
Link copied to clipboard
inline fun toDouble(): Double

Converts this ULong value to Double.

toFloat
Link copied to clipboard
inline fun toFloat(): Float

Converts this ULong value to Float.

toInt
Link copied to clipboard
inline fun toInt(): Int

Converts this ULong value to Int.

toLong
Link copied to clipboard
inline fun toLong(): Long

Converts this ULong value to Long.

toShort
Link copied to clipboard
inline fun toShort(): Short

Converts this ULong value to Short.

toString
Link copied to clipboard
open override fun toString(): String
toUByte
Link copied to clipboard
inline fun toUByte(): UByte

Converts this ULong value to UByte.

toUInt
Link copied to clipboard
inline fun toUInt(): UInt

Converts this ULong value to UInt.

toULong
Link copied to clipboard
inline fun toULong(): ULong

Returns this value.

toUShort
Link copied to clipboard
inline fun toUShort(): UShort

Converts this ULong value to UShort.

xor
Link copied to clipboard
infix inline fun xor(other: ULong): ULong

Performs a bitwise XOR operation between the two values.

Extensions

coerceAtLeast
Link copied to clipboard
fun ULong.coerceAtLeast(minimumValue: ULong): ULong

Ensures that this value is not less than the specified minimumValue.

coerceAtMost
Link copied to clipboard
fun ULong.coerceAtMost(maximumValue: ULong): ULong

Ensures that this value is not greater than the specified maximumValue.

coerceIn
Link copied to clipboard
fun ULong.coerceIn(minimumValue: ULong, maximumValue: ULong): ULong

Ensures that this value lies in the specified range minimumValue..maximumValue.

fun ULong.coerceIn(range: ClosedRange<ULong>): ULong

Ensures that this value lies in the specified range.

convert
Link copied to clipboard
inline external fun <R : Any> ULong.convert(): R
countLeadingZeroBits
Link copied to clipboard
inline fun ULong.countLeadingZeroBits(): Int

Counts the number of consecutive most significant bits that are zero in the binary representation of this ULong number.

countOneBits
Link copied to clipboard
inline fun ULong.countOneBits(): Int

Counts the number of set bits in the binary representation of this ULong number.

countTrailingZeroBits
Link copied to clipboard
inline fun ULong.countTrailingZeroBits(): Int

Counts the number of consecutive least significant bits that are zero in the binary representation of this ULong number.

downTo
Link copied to clipboard
infix fun ULong.downTo(to: ULong): ULongProgression

Returns a progression from this value down to the specified to value with the step -1.

rotateLeft
Link copied to clipboard
inline fun ULong.rotateLeft(bitCount: Int): ULong

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

rotateRight
Link copied to clipboard
inline fun ULong.rotateRight(bitCount: Int): ULong

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.

takeHighestOneBit
Link copied to clipboard
inline fun ULong.takeHighestOneBit(): ULong

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.

takeLowestOneBit
Link copied to clipboard
inline fun ULong.takeLowestOneBit(): ULong

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

toString
Link copied to clipboard
fun ULong.toString(radix: Int): String

Returns a string representation of this Long value in the specified radix.

until
Link copied to clipboard
infix fun ULong.until(to: ULong): ULongRange

Returns a range from this value up to but excluding the specified to value.