title: What's the best practice to round a float to 2 decimals?
body: <p>I'm using eclipse + Android SDK.</p>
  
  <p>I need to round a float value to 2 decimals. I usually use the next "trick" using Math library.</p>
  
  <pre><code>float accelerometerX = accelerometerX * 100;
      accelerometerX = round(accelerometerX);
      Log.d("Test","" + accelerometerX/100);
  </code></pre>
  
  <p>But I feel it is not the best way to do it.</p>
  
  <p>Is there a library to do these type of operations?</p>