Here you can find the source of roundLong(double a)
Parameter | Description |
---|---|
a | double to be rounded |
public static long roundLong(double a)
//package com.java2s; public class Main { /** Returns a double rounded to the nearest integer. * @param a double to be rounded/*w w w. j a v a 2s. c o m*/ * @return long containing the rounded number. */ public static long roundLong(double a) { return (long) Math.floor(a + 0.5); } }