Fixed

inline class Fixed : Comparable<Fixed>

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: +-9999999.99

7 integer digits, 2 decimal digits.

1 bit for sign 23~24 bits of integer 6~7 bits of decimal

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val raw: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun compareTo(other: Fixed): Int
Link copied to clipboard
operator fun div(other: Fixed): Fixed
Link copied to clipboard
operator fun minus(other: Fixed): Fixed
Link copied to clipboard
operator fun plus(other: Fixed): Fixed
Link copied to clipboard
operator fun rem(other: Fixed): Fixed
Link copied to clipboard
operator fun times(other: Fixed): Fixed
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(): Fixed
Link copied to clipboard
operator fun unaryPlus(): Fixed