From a given double
I want to get the next highest number according to some rules which, since I have some difficulty describing them, I will illustrate by examples:
Input Desired output
------- --------------
0.08 0.1
0.2 0.5
5 10
7 10
99 100
100 500
2345 5000
The output should be in some sense the 'next highest multiple of 5 or 10'.
I hope this is understandable; if not, let me know.
The implementation will be in java and input will be positive double
s.