LengthUnit

open class LengthUnit @JvmOverloads constructor(val metersPerUnit: Double, val symbol: String, squaredUnit: AreaUnit? = null) : UnitOfMeasure, Comparable<LengthUnit> (source)

Represents a unit of Length measurement.

See also

Constructors

Link copied to clipboard
constructor(metersPerUnit: Double, symbol: String, squaredUnit: AreaUnit? = null)

Properties

Link copied to clipboard

Conversion factor from this unit to meters.

Link copied to clipboard
open override val symbol: String

The symbol used to represent this unit.

Functions

Link copied to clipboard
operator override fun compareTo(other: LengthUnit): Int
Link copied to clipboard
open fun format(value: Double, decimalPlaces: Int = Int.MAX_VALUE): String

Formats a value with this unit's symbol.

Link copied to clipboard
operator fun times(other: LengthUnit): AreaUnit

Multiplies two LengthUnits to produce an AreaUnit.