title: ICAST: Integral division result cast to double or float
body: <p>When i run sonar in my code i got following ICAST: Integral division result cast to double or float</p>
  
  <pre><code>float halfCanvasWidth = canvas.getWidth() / 2f;
  </code></pre>
  
  <p>canvas.getWidth() is integer How do i cast this properly</p>