MetricBaseUnit
interface MetricBaseUnit<System : MeasurementSystem, MeasurementUsage.UsedInMetric, Quantity : PhysicalQuantity> : SystemScientificUnit<System, Quantity>
A base unit of a PhysicalQuantity used in a MeasurementSystem that has MeasurementUsage.UsedInMetric Base units can be multiplied using MetricMultipleUnit to get a derived unit (e.g. Meter to Kilometer)
Parameters
System
the type of MeasurementSystem to use. Must have MeasurementUsage.UsedInMetric
Quantity
the type of PhysicalQuantity of the unit
Inheritors
Properties
Functions
Link copied to clipboard
fun <Quantity : PhysicalQuantity> ScientificUnit<Quantity>.convert(value: Decimal, to: ScientificUnit<Quantity>): Decimal
fun <Quantity : PhysicalQuantity> ScientificUnit<Quantity>.convert(value: Number, to: ScientificUnit<Quantity>): Double
fun <Quantity : PhysicalQuantity> ScientificUnit<Quantity>.convert(value: Decimal, to: ScientificUnit<Quantity>, round: Int, roundingMode: RoundingMode = RoundingMode.RoundHalfEven): Decimal
Converts a value in a ScientificUnit to the value of another unit with the same PhysicalQuantity
fun <Quantity : PhysicalQuantity> ScientificUnit<Quantity>.convert(value: Number, to: ScientificUnit<Quantity>, round: Int, roundingMode: RoundingMode = RoundingMode.RoundHalfEven): Double
Converts a value in a ScientificUnit to the value of another unit with the same PhysicalQuantity and rounds it
Link copied to clipboard
Converts a value of the ScientificUnit of Quantity to be used according to the SI into a value of this unit