Quantity.opBinary

Division by 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)
  4. auto opBinary(RhsU rhs)
    struct Quantity(Unit, ValueType = double)
    static if(!is(Unit.LinearBaseUnit BaseUnit))
    opBinary
    (
    string op : "/"
    RhsU
    )
    (
    RhsU rhs
    )
    if (
    isUnit!RhsU
    )
    if (
    isUnit!Unit
    )
  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 * dimensionless);

Meta