Flowdock
round() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rational.rb, line 373
  def round()
    if @numerator < 0
      num = -@numerator
      num = num * 2 + @denominator
      den = @denominator * 2
      -(num.div(den))
    else
      num = @numerator * 2 + @denominator
      den = @denominator * 2
      num.div(den)
    end
  end
Register or log in to add new notes.