I want to round up double number in java such that it converts to it's nearest tenth like below..
0.1--->0.1 0.3--->1 1----->1 1.5---->10 92---->100 4.0E8-->1.0E9 etc
How can I do it Actually my intention is to set Y-axis on chart, if max value is 0.1 then num_ spacing will set to .01 if it is .3 then convert to 1 then set num_ spacing to .1 and so on