Skip to main content

Decimal.*

*that

Group: Operators
Aliases: times

Documentation

Multiplies a Decimal by another Decimal or other kind of number.

Arguments to * will undergo automatic conversions such that you need not convert other numeric types to Decimal manually.

Arguments

  • that: The number to multiply by this.

Examples

Multiplying 10.22 and 20.33.

      a = Decimal.new "10.22"
b = Decimal.new "20.33"
c = a * b
# => Decimal.new 207.7726