title: Convert Float to Int in Swift
body: <p>I want to convert a <code>Float</code> to an <code>Int</code> in Swift. Basic casting like this does not work because these types are not primitives, unlike <code>float</code>s and <code>int</code>s in Objective-C</p>
  
  <pre><code>var float: Float = 2.2
  var integer: Int = float as Float
  </code></pre>
  
  <p>But this produces the following error message:</p>
  
  <blockquote>
    <p>'Float' is not convertible to 'Int'</p>
  </blockquote>
  
  <p>Any idea how to property convert from <code>Float</code> to <code>Int</code>?</p>