title: Rounding a float to the nearest integer in ruby
body: <p>If i have a float of 49.967 and I do .to_i it will chop it down to 49 which for my use of disk space analysis .967 is over 900mb of space that wont be accounted for in the displays.</p>
  
  <p>Is there a function to round numbers to the nearest integer or would i have to define it my self like this:</p>
  
  <pre><code>class Float
    def to_nearest_i
      (self+0.5).to_i
    end
  end
  </code></pre>
  
  <p>so that i could then do:</p>
  
  <pre><code>&gt;&gt; 5.44.to_nearest_i
  =&gt; 5
  &gt;&gt; 5.54.to_nearest_i
  =&gt; 6
  </code></pre>