Java Ceil ceil(double d, int p)

Here you can find the source of ceil(double d, int p)

Description

ceil

License

Apache License

Declaration

public static double ceil(double d, int p) 

Method Source Code

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

public class Main {

    public static double ceil(double d, int p) {
        long tmp = (long) Math.pow(10, p);
        double num = Math.ceil(d * tmp);
        num /= tmp;/*ww  w .  j a va2  s  . co  m*/
        return num;
    }
}

Related

  1. ceil(double a, double precision)
  2. ceil(double a, int cutOfDigits)
  3. ceil(double d)
  4. ceil(double d)
  5. ceil(double d, int exp)
  6. ceil(double double1, double double2)
  7. ceil(double num, int bit)
  8. ceil(double value, int decimal)
  9. ceil(double value, int scale)