create

abstract fun create(baseUnit: U, toBaseUnits: UnaryFunction, fromBaseUnits: UnaryFunction, name: String, symbol: String): U

Creates a new unit instance based on its relation to the base unit of measure.

Return

a new unit

Parameters

baseUnit

the base unit of the unit system

toBaseUnits

a function that converts values of the new unit to equivalent values in terms of the base unit

fromBaseUnits

a function that converts values in the base unit to equivalent values in terms of the new unit

name

the name of the new unit

symbol

the shorthand symbol of the new unit