title: Split a double by dot to two numbers
body: <p>So I am trying to split a number in swift, I have tried searching for this on the internet but have had no success. So first I will start with a number like:</p>
  
  <pre><code>var number = 34.55
  </code></pre>
  
  <p>And from this number, I want to create two separate number by splitting from the dot. So the output should be something like:</p>
  
  <pre><code>var firstHalf = 34
  var secondHalf = 55
  </code></pre>
  
  <p>Or the output can also be in an array of thats easier. How can I achieve this?</p>