title: Migrating ObjC NSNumber code to Swift and having problems with displaying numbers.
body: <p>I am migrating my ObjC app to Swift and have run into a peculiar issue.</p>
  
  <p>My app reads a JSON file and builds a model from it. The numbers read from JSON used to be assigned to NSNumber. Some numbers were whole (eg.60) other had a decimal component (e.g. 60.23).</p>
  
  <p>When I displayed these numbers in my app, 60 would be 60 (not 60.0) and decimals would display appropriately.</p>
  
  <p>Now I am writing Swift code and assigning the numbers read from JSON to Double. Even if I use let x=String(myDouble) the number 60 will always come out 60.0</p>
  
  <p>I don't want this...but I can't just format it %f because I never know if the number will be whole or have a decimal component.</p>
  
  <p>Do I really need to check if it is a whole and then format it using it %f?</p>
  
  <p>Am I missing something in Swift? The ObjC code behaved as I wanted by now Swift seems to be giving me decimals for whole numbers.</p>