PrefixedUnit

A unit with a scaling prefix applied, e.g. kilo(metre).

There is conceptually no difference between defining a regular conversion and prefixing a unit. However, PrefixedUnit automatically generates the name of the new unit, and it is able to fold multiple prefixes of the same system, e.g. milli(kilo(metre)) to just metre.

  1. struct PrefixedUnit(BaseUnit, int exponent, alias System)
  2. template PrefixedUnit(BaseUnit, int exponent, alias System)
  3. template PrefixedUnit(alias baseUnit, int exponent, alias System)
    @safe
    template PrefixedUnit (
    alias baseUnit
    int exponent
    alias System
    ) if (
    isUnitInstance!baseUnit
    ) {}

Members

Aliases

PrefixedUnit
alias PrefixedUnit = PrefixedUnit!(typeof(baseUnit), exponent, System)
Undocumented in source.

Meta