title: c++, float to int casting
body: <p>just wanna clear about these case below:</p>
  
  <pre><code>#define MAP_CELL_SIZE_MIN 0.1f
  
  float mMapHeight = 256;
  float mScrHeight = 320;
  
  int mNumRowMax;
  </code></pre>
  
  <p>case 1:</p>
  
  <pre><code>mNumRowMax = mMapHeight/( MAP_CELL_SIZE_MIN * mScrHeight );
  </code></pre>
  
  <p><code>mNumRowMax</code> is now 7, but actually it must be 8 ( 256/32 ), and if I change the define of <code>MAP_CELL_SIZE_MIN</code> to only <code>0.1</code> then it goes true, <code>mNumRowMax</code> is 8, so what's wrong with the <code>'f'</code></p>
  
  <p>case 2:</p>
  
  <pre><code>float tmp = mMapHeight/( MAP_CELL_SIZE_MIN * mScrHeight );//tmp = 8.0
  mNumRowMax = tmp;
  </code></pre>
  
  <p><code>mNumRowMax</code> is now 8, so can anybody help me understand what is wrong with the first case when <code>mNumRowMax</code> is 7</p>