Here you can find the source of ceil(double value, int scale)
Parameter | Description |
---|---|
value | the value |
scale | the scale |
public static double ceil(double value, int scale)
//package com.java2s; //License from project: Apache License public class Main { /**/*w w w.j a va2 s . com*/ * Ceil. * * @param value * the value * @param scale * the scale * @return the double */ public static double ceil(double value, int scale) { double power = Math.pow(10, scale); return Math.ceil(value * power) / power; } }