title: Convert a float to two int in c/++
body: <p><em><strong>NOT A DUPLICATE</em>: the duplicated mentioned above, returns the decimal part into a float, and not a int</strong></p>
  
  <p>Given I have a float <code>1.495</code> How can I convert it into, <code>1</code> and <code>495</code> given two <code>int</code> variables <code>r</code> and <code>d</code>. Where:</p>
  
  <pre><code>int r == 1;
  int d == 495;
  </code></pre>
  
  <p>I can get the first one using</p>
  
  <pre><code>int r = (int)(1.495f-1l);
  </code></pre>
  
  <p>But im not sure on how to cast or get the <code>d</code> value.</p>
  
  <p><em>Note I am not sure of the range of decimal part, the decimal part could be <code>.49</code> or <code>.495</code> or <code>.4959</code></em></p>
  
  <p><em>In the case of the value being <code>.0495</code> or <code>.00495</code> I am OK with the value being returned to be 495, I didn't think of this originally.</em></p>
  
  <p>Thanks</p>