On 2018-07-07 14:50, Carlos E. R. wrote> Hi,
Do we have something that would round a number in a script?
I have:
case "$1" in 72.009|72) DPI=72 ;; 86.0044|86) DPI=86 ;; 96.01) DPI=96 ;; 240.005|240) DPI=240 ;; 149.99) DPI=150 ;; 265.99|266) DPI=266 ;; 299.999|300) DPI=300 ;; 265.989|266) DPI=266 ;; 359.99|359.994|360) DPI=360 ;; 359.99000000000000909) DPI=360 ;;
This is absurd. Now I have another value, 265.99000000000000909 and I have to add another exception. I think I can write up my own tool, but perhaps it already exists :-?
What do you want to achieve and where do these numbers come from? Maybe you could work something out in the prior step or the one after this. Cheers -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org