Here you can find the source of roundBig(double d)
public static double roundBig(double d)
//package com.java2s; // The license under which this software is released can be accessed at: public class Main { public static double roundBig(double d) { long i = (long) d; d -= i;// w w w. j av a 2 s .c o m return i + (d >= 0.5 ? 1 : (d <= -0.5 ? -1 : 0)); } }