Here you can find the source of round(final float f)
public static final int round(final float f)
//package com.java2s; //License from project: Open Source License public class Main { public static final int round(final float f) { return (int) (f > 0 ? f + 0.5F : f - 0.5F); }// w ww . j a v a 2 s. com }