title: How to round a number up or down in Rust?
body: <p>How to floor or ceil numbers?  I tried to use the <code>round</code> crate but either it doesn't work or I'm using it wrong.</p>
  
  <pre class="lang-rust prettyprint-override"><code>use round::round_down;
  
  fn main() {
    println!("{}", round_down(5.5f64, 0));  
  }
  </code></pre>
  
  <p>This prints <code>5.5</code> but should print <code>5</code>.</p>
  
  <p>My <code>Cargo.toml</code> file contains this:</p>
  
  <pre><code>[dependencies]
  round = "0.1.0"
  </code></pre>