FixedLong

inline class FixedLong : Comparable<FixedLong>

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

Floating points have more precision in the range 0, 1 and losses decimal precision outside that range. This fixed point won't lose precision in any integer range.

Fixed in decimal it has precision of: +-99999999999999.9999

14 integer digits, 4 decimal digits.

1 bit for sign 47~48 bits of integer 14~15 bits of decimal

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val raw: Long
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun compareTo(other: FixedLong): Int
Link copied to clipboard
operator fun div(other: FixedLong): FixedLong
Link copied to clipboard
operator fun minus(other: FixedLong): FixedLong
Link copied to clipboard
operator fun plus(other: FixedLong): FixedLong
Link copied to clipboard
operator fun rem(other: FixedLong): FixedLong
Link copied to clipboard
operator fun times(other: FixedLong): FixedLong
Link copied to clipboard
Link copied to clipboard
fun toFloat(): Float
Link copied to clipboard
fun toInt(): Int
Link copied to clipboard
fun toLong(): Long
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
operator fun unaryMinus(): FixedLong
Link copied to clipboard
operator fun unaryPlus(): FixedLong