Class: Rational
Instance Method Summary collapse
-
#to_d ⇒ BigDecimal
Converts the rational to a BigDecimal.
Instance Method Details
#to_d ⇒ BigDecimal
Converts the rational to a BigDecimal
58 59 60 |
# File 'lib/ruby/to_d.rb', line 58 def to_d numerator.to_d / denominator.to_d end |