Is there a clever algorithm for rounding a number by order of magnitude?
I'm trying to set the axis bounds on a chart control such that if, for example,
max Y = 5637, max axis Y = 6000
min Y = 2312, min axis Y = 2000
I'd guess I'd also want to round up and down to the largest order of magnitude. Thus:
max Y = 5637, max axis Y = 6000
min Y = 134, min axis Y = 0 (i.e. not 100).
