Unit
Constructors
Link copied to clipboard
protected constructor(baseUnit: U, toBaseConverter: UnaryFunction, fromBaseConverter: UnaryFunction, name: String, symbol: String)
Creates a new unit defined by its relationship to some base unit.
Creates a new unit with the given name and multiplier to the base unit.
Functions
Link copied to clipboard
Converts a magnitude in terms of another unit of the same dimension to a magnitude in terms of this unit.
Link copied to clipboard
Checks if this unit is equivalent to another one.
Link copied to clipboard
Converts a value in terms of base units to a value in terms of this unit.
Link copied to clipboard
Gets the conversion function used to convert values to terms of this unit.
Link copied to clipboard
Gets the conversion function used to convert values to base unit terms.
Link copied to clipboard
Checks if this unit is the base unit for its own system of measurement.
Link copied to clipboard
Creates a new measure with a magnitude equal to the given base unit magnitude, converted to be in terms of this unit.
Link copied to clipboard
Converts a value in terms of this unit to a value in terms of the base unit.