This module defines quantities that are statically checked for dimensional consistency at compile-time.
This module defines functions to parse units and quantities.
This module defines dimensionally variant quantities, mainly for use at run-time.
Importing quantities.si instantiate all the definitions of the SI units, prefixes, parsing functions and formatting functions, both at run-time and compile-time, storint their values as a double.
The purpose of this small library is to perform automatic compile-time or run-time dimensional checking when dealing with quantities and units.
There is no actual distinction between units and quantities, so there are no distinct quantity and unit types. All operations are actually done on quantities. For example, meter is both the unit _meter_ and the quantity _1m_. New quantities can be derived from other ones using operators or dedicated functions.
Quantities can be parsed from strings at run time and compile time.
The main SI units and prefixes are predefined. Units with other dimensions can be defined by the user.