how can i round up a floating point number to the next integer value in Java? Suppose
2.1 -->3 3.001 -->4 4.5 -
2.1 -->3
3.001 -->4
4.5 -
I'm using this:
public static int roundDoubleToUpperInt(double d){ return (d%1==0.0f)?(int)d:(int)(d+1); }