Package-level declarations

Types

Link copied to clipboard
inline class Fixed : Comparable<Fixed>

Fixed point class, to handle decimal values with a fixed precision.

Link copied to clipboard
inline class FixedLong : Comparable<FixedLong>

Fixed point class, to handle decimal values with a fixed precision.

Link copied to clipboard

FixedShort point class using a 16-bit short as backup, to handle decimal values with a fixed precision.

Link copied to clipboard
inline class Half(val rawBits: UShort)

Represents a floating point value of 16 bits. Also known as Half-precision floating-point format (IEEE 754-2008). This is an inline class backed by a UShort. No operations defined for this class, you should convert from and into other values. To get its internal representation, call the toRawBits function.

Link copied to clipboard
inline class Int53(val value: Double) : Comparable<Int53>

Represents and integral value of 52-bits + sign using a Double as internal representation. Trying to avoid allocations on the JS target by not using Long when 53 bits is enough.

Properties

Functions

Link copied to clipboard
fun StringBuilder.appendNice(value: Double, zeroSuffix: Boolean = false)
fun StringBuilder.appendNice(value: Float, zeroSuffix: Boolean = false)
Link copied to clipboard
fun Double.niceStr(decimalPlaces: Int, zeroSuffix: Boolean = false): String
fun Float.niceStr(decimalPlaces: Int, zeroSuffix: Boolean = false): String
Link copied to clipboard
Link copied to clipboard
fun Int.toHalf(): Half
inline fun Number.toHalf(): Half

Converts value into Half

Link copied to clipboard
inline fun Double.toInt53(): Int53
inline fun Int.toInt53(): Int53
inline fun Long.toInt53(): Int53
inline fun Number.toInt53(): Int53
inline fun String.toInt53(): Int53
Link copied to clipboard
inline fun String.toInt53OrNull(): Int53?
Link copied to clipboard
fun Int.toStringUnsigned(radix: Int = 10): String
fun Long.toStringUnsigned(radix: Int = 10): String