Java Ceil ceil(float value)

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

Description

Returns the smallest integer greater than or equal to the specified float.

License

Open Source License

Declaration

static public int ceil(float value) 

Method Source Code

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

public class Main {
    static private final int BIG_ENOUGH_INT = 16 * 1024;
    static private final double BIG_ENOUGH_CEIL = 16384.999999999996;

    /** Returns the smallest integer greater than or equal to the specified float. This method will only properly ceil floats from
     * -(2^14) to (Float.MAX_VALUE - 2^14). */
    static public int ceil(float value) {
        return (int) (value + BIG_ENOUGH_CEIL) - BIG_ENOUGH_INT;
    }/*  www .  j  a  v a  2s .c o m*/
}

Related

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