Java Number Round roundToTop(float f)

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

Description

round To Top

License

Apache License

Declaration

public static int roundToTop(float f) 

Method Source Code

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

public class Main {
    public static int roundToTop(float f) {
        if (f > (int) f)
            return (int) (f + 1);
        return (int) f;
    }/*from w  w w . ja v  a2s .co m*/
}

Related

  1. roundToSignificantDigits(double value, int n)
  2. roundToSignificantDigits(double x, double y, int nSignif)
  3. roundToSignificantFigures(double num, int n)
  4. RoundToStr(double value, int dec)
  5. roundToString(double nb2round, int nbOfDigits)
  6. roundToWord(long value)
  7. roundToZero(float x)
  8. roundTwoDecimals(double value)
  9. roundUp(double a)