Here you can find the source of roundPositive(float value)
static public int roundPositive(float value)
//package com.java2s; //License from project: Open Source License public class Main { /** Returns the closest integer to the specified float. This method will only properly round floats that are positive. */ static public int roundPositive(float value) { return (int) (value + 0.5f); }/*from ww w. jav a 2 s. co m*/ }