UnitImpl.opBinaryRight

Multiplication/division of an unit and a value type, constructing a Quantity instance.

  1. auto opBinaryRight(V lhs)
    mixintemplate UnitImpl()
    opBinaryRight
    (
    string op : "*"
    V
    )
    (
    V lhs
    )
    if (
    !(
    isUnit!V ||
    isQuantity!V
    )
    )
  2. auto opBinaryRight(V lhs)
  3. auto opBinary(V rhs)
  4. auto opBinary(V rhs)

Examples

auto a = 2 * metre;
auto b = 2 / metre;
auto c = metre * 2;
auto d = metre / 2;

Meta