[][src]Macro uom::prefix

macro_rules! prefix {
    (yotta) => { ... };
    (zetta) => { ... };
    (exa) => { ... };
    (peta) => { ... };
    (tera) => { ... };
    (giga) => { ... };
    (mega) => { ... };
    (kilo) => { ... };
    (hecto) => { ... };
    (deca) => { ... };
    (none) => { ... };
    (deci) => { ... };
    (centi) => { ... };
    (milli) => { ... };
    (micro) => { ... };
    (nano) => { ... };
    (pico) => { ... };
    (femto) => { ... };
    (atto) => { ... };
    (zepto) => { ... };
    (yocto) => { ... };
    (yobi) => { ... };
    (zebi) => { ... };
    (exbi) => { ... };
    (pebi) => { ... };
    (tebi) => { ... };
    (gibi) => { ... };
    (mebi) => { ... };
    (kibi) => { ... };
}

Macro to implement the SI prefixes for multiples of units, submultiples of units and binary multiples of units.

Implemented using macro_rules! instead of const so that type inference at call sites can generate the appropriate float type. Using explicit constants would require duplicate definitions for f32 and f64 or casting from f64 in f32 contexts.