UInt24

value class UInt24(val value: UInt) : Comparable<UInt24>

A 24-bit representation of an (unsigned) Integer

Constructors

Link copied to clipboard
constructor(value: UInt)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val value: UInt

the UInt value this Integer represents. Must be between UInt24.MIN_VALUE and UInt24.MAX_VALUE

Functions

Link copied to clipboard
infix fun UInt24.and(other: UInt24): UInt24
Link copied to clipboard
open operator override fun compareTo(other: UInt24): Int
Link copied to clipboard
fun UInt24.copyIntoByteArray(array: ByteArray, offset: Int = 0, byteOrder: ByteOrder): ByteArray

Encodes this UInt24 and copies it into a ByteArray at a given offset.

Link copied to clipboard
operator fun div(other: UInt24): UInt24
Link copied to clipboard

Checks whether the bit at index is set in this UInt24

Link copied to clipboard
operator fun minus(other: UInt24): UInt24
Link copied to clipboard
infix fun UInt24.or(other: UInt24): UInt24
Link copied to clipboard
operator fun plus(other: UInt24): UInt24
Link copied to clipboard
fun UInt24.setBit(index: Number): UInt24

Creates a UInt24 that is equal to this UInt24 except the bit at index is set

Link copied to clipboard
infix fun UInt24.shl(bitCount: Int): UInt24
Link copied to clipboard
infix fun UInt24.shr(bitCount: Int): UInt24
Link copied to clipboard
operator fun times(other: UInt24): UInt24
Link copied to clipboard

Encodes this UInt24 into a ByteArray.

Link copied to clipboard

Converts this UInt24 value to Int24. If this value is positive, the resulting Int24 value represents the same numerical value as this UInt24. The resulting Int24 value has the same binary representation as this UInt24 value.