This is a Scala library of units of measurement featuring the International System of Units (SI).
The main types defined are
A quantity is composed of a magnitude and a unit. It provides arithmetic operations where -- in many cases -- the system is smart enough to derive the correct type of the result: for instance, a quantity which unit has been computed to be mass * ((length / time) / time) automatically becomes a quantity of force unit. There are also nice shortcuts that, e.g., allow a
Quantity(10, metre) to be written as
Unit classes are provided for the seven SI base units along with associated objects of common names like
second and so on. Furthermore, a (of course not complete) bunch of derived SI units like
volt is supported. The
Prefix class has case objects providing the usual SI prefixes like
milli along with a multiplication operation for units.