Java Number Round roundUp(double a)

Here you can find the source of roundUp(double a)

Description

Returns the closest int to the argument, with ties rounding up.

License

Open Source License

Declaration

public static int roundUp(double a) 

Method Source Code

//package com.java2s;
//License from project: GNU General Public License 

public class Main {
    /** Returns the closest int to the argument, with ties rounding up. */
    public static int roundUp(double a) {
        return (int) Math.round(a);
    }//  w w  w.ja  va  2  s  . c om

    /** Returns the closest int to the argument, with ties rounding up. */
    public static int roundUp(float a) {
        return Math.round(a);
    }
}

Related

  1. roundToString(double nb2round, int nbOfDigits)
  2. roundToTop(float f)
  3. roundToWord(long value)
  4. roundToZero(float x)
  5. roundTwoDecimals(double value)
  6. roundUp(double d)
  7. roundUP(double d)
  8. roundUp(double n)
  9. roundUp(double n, int precision)