Here you can find the source of round(final float a)
Parameter | Description |
---|---|
a | a parameter |
final static public int round(final float a)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w ww . ja v a 2 s . co m * Round a * * @param a */ final static public int round(final float a) { return (int) (a + Math.signum(a) * 0.5f); } /** * Round a * * @param a */ final static public int round(final double a) { return (int) (a + Math.signum(a) * 0.5); } }