Ratio

inline class Ratio(val value: Double) : Comparable<Ratio>

Constructors

Link copied to clipboard
constructor(ratio: Float)
constructor(value: Int, maximum: Int)
constructor(value: Float, maximum: Float)
constructor(value: Double, maximum: Double)
constructor(value: Double)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun Ratio.clamp(min: Ratio, max: Ratio): Ratio
Link copied to clipboard
open operator override fun compareTo(other: Ratio): Int
Link copied to clipboard
fun Ratio.convertRange(srcMin: Ratio, srcMax: Ratio, dstMin: Ratio, dstMax: Ratio): Ratio
Link copied to clipboard
fun convertToRange(min: Ratio, max: Ratio): Ratio
fun convertToRange(min: Float, max: Float): Float
Link copied to clipboard
operator fun div(that: Ratio): Ratio
operator fun div(that: Double): Double
Link copied to clipboard
inline operator fun Ratio.div(value: Double): Double
inline operator fun Ratio.div(value: Float): Float
Link copied to clipboard
Link copied to clipboard
fun Ratio.isAlmostEquals(that: Ratio, epsilon: Ratio = Ratio(0.000001)): Boolean
Link copied to clipboard
fun Ratio.isAlmostZero(epsilon: Ratio = Ratio(0.000001)): Boolean
Link copied to clipboard
fun isNaN(): Boolean
Link copied to clipboard
operator fun minus(that: Ratio): Ratio
Link copied to clipboard
fun Ratio.niceStr(decimalPlaces: Int, zeroSuffix: Boolean = false): String
Link copied to clipboard
operator fun plus(that: Ratio): Ratio
Link copied to clipboard
Link copied to clipboard
operator fun times(that: Ratio): Ratio
operator fun times(that: Double): Double
Link copied to clipboard
inline operator fun Ratio.times(value: Ratio): Ratio
inline operator fun Ratio.times(value: Double): Double
inline operator fun Ratio.times(value: Float): Float
Link copied to clipboard
Link copied to clipboard
fun toFloat(): Float
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
operator fun unaryMinus(): Ratio
Link copied to clipboard
operator fun unaryPlus(): Ratio