Here you can find the source of round(float pX)
public static int round(float pX)
//package com.java2s; public class Main { public static int round(float pX) { return floor(pX + 0.5f); }/* w w w.j av a2 s.c o m*/ public static int floor(float pX) { return pX > 0 ? (int) pX : (int) pX - 1; } }