title: Round a float to a regular grid of predefined points
body: <p>I want to round a float number to a given precision, for example :</p>
  
  <pre><code>0.051 i want to convert it to
  0.1
  
  0.049 i want to convert it to
  0.0
  
  0.56 i want to convert it to
  0.6
  
  0.54 i want to convert it to
  0.5
  </code></pre>
  
  <p>I cant explain it better, but the reason for this is to translate a point location (like 0.131f, 0.432f) to the location of tile in a grid (like 0.1f, 0.4f).</p>