title: Checking if a double value is an integer - Swift
body: <p>I need to check if a double-defined variable is convertible to Int without losing its value. This doesn't work because they are of different types:</p>
  
  <pre><code>if self.value == Int(self.value)
  </code></pre>
  
  <p>where <code>self.value</code> is a double.</p>