prefix

Creates a new prefix function that multiplies a QVariant by a _factor.

template prefix(alias factor)
prefix
(
Q
)
(
auto ref const Q base
)

Members

Aliases

N
alias N = typeof(factor)
Undocumented in source.

Functions

prefix
auto prefix(Q base)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

import std.math : approxEqual;

auto meter = unit!double("L");
alias milli = prefix!1e-3;
assert(milli(meter).value(meter).approxEqual(1e-3));

Meta