Quantity.opBinary

Multiplication with a unit instance.

Returns a quantity with the same value, but the new unit.

  1. auto opBinary(Quantity!(Unit, RhsV) rhs)
  2. auto opBinary(T rhs)
  3. auto opBinary(Rhs rhs)
    struct Quantity(Unit, ValueType = double)
    static if(!is(Unit.LinearBaseUnit BaseUnit))
    opBinary
    (
    string op : "*"
    Rhs
    )
    (
    Rhs rhs
    )
    if (
    isUnit!Rhs
    )
    if (
    isUnit!Unit
    )
  4. auto opBinary(RhsU rhs)
  5. auto opBinary(Quantity!(RhsU, RhsV) rhs)
  6. auto opBinary(Quantity!(RhsU, RhsV) rhs)
  7. auto opBinary(Quantity!(Unit, RhsV) rhs)
  8. auto opBinary(Quantity!(BaseUnit, RhsV) rhs)

Examples

auto l = 6 * metre;
assert(l * metre == 6 * pow!2(metre));

Meta