Quantity.this

Two quantites of the same unit are implicitely convertible on assignment if the underlying value types are.

  1. this(Quantity!(Unit, OtherV) other)
    struct Quantity(Unit, ValueType = double)
    this
    (
    OtherV
    )
    (
    Quantity!(Unit, OtherV) other
    )
    if (
    isAssignable!(ValueType, OtherV)
    )
    if (
    isUnit!Unit
    )
  2. Quantity opAssign(Quantity!(Unit, OtherV) other)

Examples

Quantity!(metre, float) a = 2 * metre;

Meta