Quantity.opBinaryRight

Division by a unit instance.

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

  1. auto opBinaryRight(T lhs)
  2. auto opBinaryRight(Lhs lhs)
  3. auto opBinaryRight(Lhs rhs)
    struct Quantity(Unit, ValueType = double)
    static if(!is(Unit.LinearBaseUnit BaseUnit))
    opBinaryRight
    (
    string op : "/"
    Lhs
    )
    (
    Lhs rhs
    )
    if (
    isUnit!Lhs
    )
    if (
    isUnit!Unit
    )
  4. auto opBinaryRight(Quantity!(BaseUnit, RhsV) lhs)
  5. auto opBinary(RhsU rhs)

Examples

auto l = 6 * metre;
assert(l / metre == 6 * dimensionless);

Meta