UnitsRatio

class UnitsRatio<A : Units, B : Units>(val numerator: A, val denominator: B) : Units(source)

Represents the ratio of two Units: A / B.

Parameters

numerator

unit being divided

denominator

unit dividing numerator

Constructors

Link copied to clipboard
constructor(numerator: A, denominator: B)

Properties

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

The Inverse of this unit.

Inherited properties

Link copied to clipboard
val ratio: Double = 1.0
Link copied to clipboard

Inherited functions

Link copied to clipboard
operator fun <A : Units, B : Units> UnitsRatio<A, B>.div(other: B): UnitsRatio<A, UnitsProduct<B, B>>
@JvmName(name = "div1")
operator fun <A : Units, B : Units> UnitsRatio<A, B>.div(other: UnitsRatio<A, B>): Double
operator fun <A : Units, B : Units> UnitsRatio<A, B>.div(other: UnitsRatio<A, Square<B>>): Measure<B>
@JvmName(name = "div1")
operator fun <A : Units, B : Units> UnitsRatio<UnitsProduct<A, A>, UnitsProduct<B, B>>.div(other: A): Measure<UnitsRatio<A, UnitsProduct<B, B>>>
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
@JvmName(name = "times1")
operator fun <A : Units, B : Units> UnitsRatio<A, B>.times(other: B): Measure<A>

(A / B) * B

@JvmName(name = "times4")
operator fun <A : Units, B : Units> UnitsRatio<A, B>.times(other: UnitsRatio<A, B>): UnitsRatio<UnitsProduct<A, A>, UnitsProduct<B, B>>

(A / B) * (A / B)

@JvmName(name = "times2")
operator fun <A : Units, B : Units, C : Units> UnitsRatio<A, UnitsProduct<B, C>>.times(other: B): Measure<UnitsRatio<A, C>>

(A / (B * C)) * B

Link copied to clipboard
open override fun toString(): String