div

abstract operator fun div(divisor: Double): Measure<U>(source)
open operator fun div(divisor: Number): Measure<U>(source)

Divides this measure by a scalar and returns the result.

Return

the division result

Parameters

divisor

the value to divide by


open fun div(other: Measure<out U>): Double(source)

Divides this measure by another measure and returns the ratio as a dimensionless value.

Return

the ratio of the two measures

Parameters

other

the other measure to divide by


open operator fun <V : Unit<V>> div(other: Measure<V>): Per<U, V>(source)

Divides this measure by another measure of a different type to create a ratio unit. For example, Distance / Time creates a velocity measurement, or Voltage / Distance creates electric field strength.

Subclasses can override this to return more specific types (e.g., Distance / Time → LinearVelocity).

Return

a Per measurement representing the ratio of the two measures

Parameters

other

the other measure to divide by

Type Parameters

V

the type of the other unit