Here you can find the source of round(float v)
public static int round(float v)
//package com.java2s; //License from project: Apache License public class Main { /**/* w ww . j ava 2 s . c o m*/ * A cheaper version of {@link Math#round} that doesn't handle the special cases. */ public static int round(float v) { return (v < 0f) ? (int) (v - 0.5f) : (int) (v + 0.5f); } }