Java Ceil ceil(float x)

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

Description

ceil

License

Apache License

Declaration

public static int ceil(float x) 

Method Source Code

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

public class Main {
    public static int ceil(float x) {
        return (int) (Math.ceil(x) + (x > 0 ? 0.5f : -0.5f));
    }//from w ww.j  av a 2s  .  c o m

    public static int ceil(double x) {
        return (int) (Math.ceil(x) + (x > 0 ? 0.5 : -0.5));
    }
}

Related

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