Prefix¶
A “prefix” scales a unit by some magnitude, and prepends a prefix symbol to the unit’s label.
TODO: this page is a stub
We will provide a full-fledged reference for prefixes later. For now, here are the basics:
-
We support every SI prefix and binary prefix.
-
To apply a prefix to a unit type, spell the prefix using
CamelCase(just like any other type in Au), and pass the unit type as a template parameter.- Example:
Metersis a unit type; so isCenti<Meters>. You can form aQuantityD<Centi<Meters>>.
- Example:
-
To apply a prefix to a quantity maker, spell the prefix using
snake_case(just like the quantity maker itself), and pass the quantity maker as a function parameter.- Example:
metersis a quantity maker; so iscenti(meters). If you callcenti(meters)(2.54), it will create a quantity of centimeters.
- Example: