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