Decimal.opBinary

Calculate mul.

  1. Decimal opBinary(const(Decimal) rhs)
  2. Decimal opBinary(long rhs)
  3. Decimal opBinary(const(Decimal) rhs)
    struct Decimal
    const @nogc nothrow pure
    opBinary
    (
    string op
    )
    (
    auto scope ref const(Decimal) rhs
    )
    if (
    op == "*"
    )

Parameters

rhs const(Decimal)

other hand value.

Return Value

Type: Decimal

calculated price.

Examples

immutable a = Decimal(123456, 3);
assert(a * Decimal(2, 0) == Decimal(246912, 3));
assert(a * Decimal(2, 1) == Decimal(246912, 4));

Meta