title: Swift - Remove Trailing Zeros From Double
body: <p>What is the function that removes trailing zeros from doubles?</p>
  
  <pre><code>var double = 3.0
  var double2 = 3.10
  
  println(func(double)) // 3
  println(func(double2)) // 3.1
  </code></pre>