= private = protected
floor()
Converts the rational to an Integer. Not the nearest integer, the truncated integer. Study the following example carefully:
Rational(+7,4).to_i # -> 1 Rational(-7,4).to_i # -> -1 (-1.75).to_i # -> -1
In other words:
Rational(-7,4) == -1.75 # -> true Rational(-7,4).to_i == (-1.75).to_i # -> true
# File lib/rational.rb, line 356 def floor() @numerator.div(@denominator) end