Flowdock
to_f() public

Return the value as a float.

For example:

Rational(2).to_f      #=> 2.0
Rational(9, 4).to_f   #=> 2.25
Rational(-3, 4).to_f  #=> -0.75
Rational(20, 3).to_f  #=> 6.666666666666667
Show source
Register or log in to add new notes.