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