3 ms·
Probably not even rounding, but just printf. The following works on my zsh: $ printf '%.0f°\n' 0.3 0° $ printf '%.0f°\n' -0.3 -0°
by majewsky 6y ago
Probably not even rounding, but just printf. The following works on my zsh:
$ printf '%.0f°\n' 0.3
0°
$ printf '%.0f°\n' -0.3
-0°
- a1369209993 6y agoThat actually is rounding around zero (to zero decimal places, but it is rounding).
- majewsky 6y agoYou're right. What I meant to say was that it's possible the programmers working on the weather app didn't add explicit rounding, they just passed the value through a formatter that did the rounding implicitly.