M
Malcolm McLean
I'm adding a spinner to Baby X.
Sometimes you want to adjust numbers logarithmically, i.e. the delta is multiplied by the absolute value of the number, so you get fine adjustment for tiny numbers and a big adjustment for large numbers.
I've used the format %.2g for displaying the numbers. This gives good results (7 characters) when the spinner is forced into exponential notation. But it does mean that in the middle of the range, space is wasted.
Is there a better format specifier to use?
Sometimes you want to adjust numbers logarithmically, i.e. the delta is multiplied by the absolute value of the number, so you get fine adjustment for tiny numbers and a big adjustment for large numbers.
I've used the format %.2g for displaying the numbers. This gives good results (7 characters) when the spinner is forced into exponential notation. But it does mean that in the middle of the range, space is wasted.
Is there a better format specifier to use?