Java Ceil ceil(int a, int b)

Here you can find the source of ceil(int a, int b)

Description

Return ceiling of integer division

License

Open Source License

Parameter

Parameter Description
a a parameter
b a parameter

Return

int

Declaration

protected static int ceil(int a, int b) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from   w ww.j a  va  2  s. co  m*/
     * Return ceiling of integer division
     *
     * @param a
     * @param b
     *
     * @return int
     */
    protected static int ceil(int a, int b) {
        return (a % b == 0 ? a / b : a / b + 1);
    }
}

Related

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