Example usage for java.lang StrictMath ceil

List of usage examples for java.lang StrictMath ceil

Introduction

In this page you can find the example usage for java.lang StrictMath ceil.

Prototype

public static double ceil(double a) 

Source Link

Document

Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer.

Usage

From source file:Main.java

public static void main(String[] args) {

    double d1 = 1.2, d2 = 3.4, d3 = 6.5;

    System.out.println("Ceil value of " + d1 + " = " + StrictMath.ceil(d1));

    System.out.println("Ceil value of " + d2 + " = " + StrictMath.ceil(d2));

    System.out.println("Ceil value of " + d3 + " = " + StrictMath.ceil(d3));
}