Android Float Round getFloatWithADecimal(float f)

Here you can find the source of getFloatWithADecimal(float f)

Description

get Float With A Decimal

License

Apache License

Declaration

public static float getFloatWithADecimal(float f) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static float getFloatWithADecimal(float f) {
        f = Math.round(f * 10);/*from  w w  w. j a v  a2 s  .  c o m*/
        return f / 10;
    }
}

Related

  1. getIntWithRound(float f)
  2. FloatToInt(float f)
  3. round(float d, int decimalPlace)