prefixTemplate

Shorthand for defining prefix templates like kilo!().

The created template, accessible via the result property, takes a unit instance and applies a prefix from the given list of prefixes to it.

@safe
template prefixTemplate (
int exponent
alias System
) {}

Members

Templates

prefixTemplate
template prefixTemplate(alias u)
Undocumented in source.

Examples

alias PrefixSystem!(10, { return [
    Prefix(-3, "milli", "m"),
    Prefix(3, "kilo", "k")
]; }) System;
alias prefixTemplate!(-3, System) milli;
alias prefixTemplate!(3, System) kilo;
// Use the templates like this: milli!metre, kilo!metre, etc.

Meta