Here you can find the source of round(float a)
Parameter | Description |
---|---|
a | the number |
public static int round(float a)
//package com.java2s; public class Main { /**/*from www . j a va2s .c o m*/ * Rounds the number to the closest integer * @param a the number * @return the closest integer */ public static int round(float a) { return Math.round(a); } /** * Rounds the number to the closest integer * @param a the number * @return the closest integer */ public static long round(double a) { return Math.round(a); } }