Graph x-axis values

Hi , i'm looking for some algorithm that returns nice ticks on a xasixrounded on 10fe i have values16678792i want to get all the values 0-10-20....100so rounded at 10 or 5greetings Sven
[277 byte] By [scifoa] at [2007-9-28 18:48:25]
# 1
for (int i = 0; i <= 100; i += 10)
YATArchivista at 2007-7-12 17:04:02 > top of Java-index,Other Topics,Algorithms...
# 2
txs but that is not what i meant , looking for a function that returns a rounded value when giving the maxvalue of the grapffe giving it 123 it must return 130giving 9 return 10giving 191 return 200 etcSven
scifoa at 2007-7-12 17:04:02 > top of Java-index,Other Topics,Algorithms...
# 3
Here is the method:public static int compute(int argument, int d){ return argument%d == 0 ? argument : (argument/d + 1)*d;}Now, you can call the method for 10: int k = compute(123, 10);Armen
Amartirosa at 2007-7-12 17:04:02 > top of Java-index,Other Topics,Algorithms...
# 4
txs i will try it imediatelysven
scifoa at 2007-7-12 17:04:02 > top of Java-index,Other Topics,Algorithms...