Skip to main content

Decimal./

/that

Group: Operators

Documentation

Divides a Decimal by another Decimal or other kind of number, or divides another kind of number by a Decimal.

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

Arguments

  • that: The number to divide by this.

Examples

Dividing 1065.9378 by 23.34.

      a = Decimal.new "1065.9378"
b = Decimal.new "23.34"
c = a / b
# => Decimal.new 45.67