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
Link copied to clipboard

The Inverse of this unit.

Link copied to clipboard

Functions

Link copied to clipboard
operator fun <A : Units, B : Units> UnitsRatio<A, B>.div(other: B): UnitsRatio<A, UnitsProduct<B, B>>
operator fun <A : Units, B : Units> UnitsRatio<A, B>.div(other: A): Measure<InverseUnits<B>>
@JvmName(name = "div1")
operator fun <A : Units, B : Units> UnitsRatio<A, B>.div(other: UnitsRatio<A, B>): Double
@JvmName(name = "div2")
operator fun <A : Units, B : Units> UnitsRatio<A, B>.div(other: UnitsRatio<B, A>): UnitsRatio<UnitsProduct<A, A>, UnitsProduct<B, B>>
@JvmName(name = "div3")
operator fun <A : Units, B : Units, C : Units, D : Units> UnitsRatio<A, B>.div(other: UnitsRatio<C, D>): UnitsRatio<UnitsProduct<A, D>, UnitsProduct<B, C>>
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>>>
@JvmName(name = "div2")
operator fun <A : Units, B : Units, C : Units> UnitsRatio<UnitsProduct<A, A>, UnitsProduct<B, C>>.div(other: A): Measure<UnitsRatio<A, UnitsProduct<B, C>>>
@JvmName(name = "div3")
operator fun <A : Units, B : Units, C : Units, D : Units> UnitsRatio<UnitsProduct<A, B>, UnitsProduct<C, D>>.div(other: A): Measure<UnitsRatio<B, UnitsProduct<C, D>>>
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 = "times5")
operator fun <A : Units, B : Units> UnitsRatio<A, B>.times(other: UnitsRatio<B, A>): Double

(A / B) * (B / A))

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

(A / B) * (C / D))

@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

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

(A / (B * C)) * D)

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