title: Swift - How to remove a decimal from a float if the decimal is equal to 0?
body: <p>I'm displaying a distance with one decimal, and I would like to remove this decimal in case it is equal to 0 (ex: 1200.0Km), how could I do that in swift?
  I'm displaying this number like this:</p>
  
  <pre><code>let distanceFloat: Float = (currentUser.distance! as NSString).floatValue
  distanceLabel.text = String(format: "%.1f", distanceFloat) + "Km"
  </code></pre>