Java Number Round roundNumber(float input, float rounding)

Here you can find the source of roundNumber(float input, float rounding)

Description

round Number

License

Open Source License

Declaration

public static float roundNumber(float input, float rounding) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static float roundNumber(float input, float rounding) {
        int o = (int) (input * rounding);
        return o / rounding;
    }/*w  w  w .j a  va2  s  .  co m*/
}

Related

  1. roundMultiplier(double n)
  2. roundNearest(double v, double target)
  3. roundNicely(double dbl)
  4. roundNumber(double rowNumber, int roundingPoint)
  5. roundNumber(double theNumber, int places)
  6. roundNumber(String n)
  7. roundNumberTo(double value, int decimals)
  8. roundNumberToDouble(double value, int decimals)
  9. roundOff(double fraction, int precision)