Hi,
I have a application in which i need to 'round' number to there closest 'clean' number... meaning:
number should become 'nice' number
4.3235... -> 4.5
0.0068... -> 0.01
0.0035... -> 0.005
35.2154 -> 35.5
So it's always rounding to the above number, but I don't know how to make a methode that would do this... decimal number should stay decimal, with Math.ceil 0.005 becomes 1 ! and I don't know hoz to round to the closest HALF...
I hope you understand what I mean...
thanx in advance,
triion
I have a application in which i need to 'round' number to there closest 'clean' number... meaning:
number should become 'nice' number
4.3235... -> 4.5
0.0068... -> 0.01
0.0035... -> 0.005
35.2154 -> 35.5
So it's always rounding to the above number, but I don't know how to make a methode that would do this... decimal number should stay decimal, with Math.ceil 0.005 becomes 1 ! and I don't know hoz to round to the closest HALF...
I hope you understand what I mean...
thanx in advance,
triion