List of utility methods to do Float Round
int | getIntWithRound(float f) get Int With Round return Math.round(f);
|
float | getFloatWithADecimal(float f) get Float With A Decimal f = Math.round(f * 10);
return f / 10;
|
int | FloatToInt(float f) Float To Int return Float.floatToIntBits(f);
|
float | round(float d, int decimalPlace) round BigDecimal bd = new BigDecimal(Float.toString(d)); bd = bd.setScale(decimalPlace, BigDecimal.ROUND_FLOOR); return bd.floatValue(); |