std.si

International System of Units (SI) units and prefixes for use with std.units.

The definitions have been taken from the NIST Special Publication 330, The International System of Units, 2008 edition.

Todo:

License:
Boost License 1.0.

Authors:
David Nadlinger

alias SiPrefixSystem;
The full std.units.PrefixSystem of SI prefixes.

For each prefix, a helper template like kilo!() for prefixing units is provided (see std.units.prefixTemplate).

BaseUnit!("Ampere","A") ampere;
BaseUnit!("candela","cd") candela;
BaseUnit!("gram","g") gram;
PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ) kilogram;
BaseUnit!("Kelvin","K") kelvin;
BaseUnit!("metre","m") metre;
alias meter;
BaseUnit!("mole","mol") mole;
BaseUnit!("second","s") second;
SI base units.

BaseUnit!("radian","rad") radian;
BaseUnit!("steradian","sr") steradian;
SI supplementary units for angles.

DUnit!(BaseUnitExp!(BaseUnit!("second","s"),Rational!(-1))) hertz;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(1)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-2,1u))) newton;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(-1,1u)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-2,1u))) pascal;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-2,1u))) joule;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-3,1u))) watt;
DUnit!(BaseUnitExp!(BaseUnit!("Ampere","A"),Rational!(1)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(1))) coulomb;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("Ampere","A"),Rational!(-1)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-3,1u))) volt;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(-1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(-2,1u)),BaseUnitExp!(BaseUnit!("Ampere","A"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(4,1u))) farad;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("Ampere","A"),Rational!(-2,1u)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-3,1u))) ohm;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(-1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(-2,1u)),BaseUnitExp!(BaseUnit!("Ampere","A"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(3,1u))) siemens;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("Ampere","A"),Rational!(-1)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-2,1u))) weber;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("Ampere","A"),Rational!(-1)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-2,1u))) tesla;
DUnit!(BaseUnitExp!(PrefixedUnit!(BaseUnit!("gram","g"),exponent,__T12PrefixSystemVi10S51_D3std2si12__dgliteral1MFNaNbNfZAS3std5units6PrefixZ),Rational!(1)),BaseUnitExp!(BaseUnit!("metre","m"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("Ampere","A"),Rational!(-2,1u)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-2,1u))) henry;
DUnit!(BaseUnitExp!(BaseUnit!("candela","cd"),Rational!(1)),BaseUnitExp!(BaseUnit!("steradian","sr"),Rational!(1))) lumen;
DUnit!(BaseUnitExp!(BaseUnit!("metre","m"),Rational!(-2,1u)),BaseUnitExp!(BaseUnit!("candela","cd"),Rational!(1)),BaseUnitExp!(BaseUnit!("steradian","sr"),Rational!(1))) lux;
DUnit!(BaseUnitExp!(BaseUnit!("second","s"),Rational!(-1))) becquerel;
DUnit!(BaseUnitExp!(BaseUnit!("metre","m"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-2,1u))) gray;
DUnit!(BaseUnitExp!(BaseUnit!("metre","m"),Rational!(numerator,denominator)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-2,1u))) sievert;
DUnit!(BaseUnitExp!(BaseUnit!("mole","mol"),Rational!(1)),BaseUnitExp!(BaseUnit!("second","s"),Rational!(-1))) katal;
SI derived units.