Here you can find the source of ceil(double a, double precision)
Parameter | Description |
---|---|
a | Value |
precision | Precision |
public static double ceil(double a, double precision)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w .ja va2s . com * Returns a rounded number larger than {@code a} with a defined * precision. * * @param a Value * @param precision Precision * @return Rounded value */ public static double ceil(double a, double precision) { if (precision == 0.0) { return 0.0; } return Math.ceil(a / precision) * precision; } }