Java Ceil ceil(float x)

Here you can find the source of ceil(float x)

Description

ceil

License

Open Source License

Declaration

public static int ceil(float x) 

Method Source Code

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

public class Main {
    public static int ceil(float x) {
        int res = (int) x;
        if (res == x) {
            return res;
        } else if (x >= 0) {
            return res + 1;
        } else {//from www.  jav a  2s.com
            return res - 1;
        }
    }
}

Related

  1. ceil(float f)
  2. ceil(float floatNumber)
  3. ceil(float pX)
  4. ceil(float value)
  5. ceil(float value)
  6. ceil(float x)
  7. ceil(float x)
  8. ceil(int a, int b)
  9. ceil(int dividend, int divisor)