List of usage examples for java.lang StrictMath rint
public static double rint(double a)
From source file:Main.java
public static void main(String[] args) { double d1 = 1.2, d2 = 34.5, d3 = 6.7; System.out.println("integer value closest to " + d1 + " = " + StrictMath.rint(d1)); System.out.println("integer value closest to " + d2 + " = " + StrictMath.rint(d2)); System.out.println("integer value closest to " + d3 + " = " + StrictMath.rint(d3)); }