FixedShort

FixedShort point class using a 16-bit short as backup, 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.

FixedShort in decimal it has precision of: +-3275.9

3.3 integer digits, 1 decimal digit.

1 bit for sign 11~12 bits of integer 3~5 bits of decimal

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val raw: Short
Link copied to clipboard
Link copied to clipboard

Functions

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