Sorry @Piotr, got pulled into doing other work.
I think there’s two things happening. First, using
Round component will round 0.5 intervals to ceiling (of the desired decimal length), i.e.
0.5 -> 1.0, or
0.55 -> 0.56. Values of
0.49 will round to the floor, i.e.
round(x) will round to the floor from
0.5. It must be how the component was implemented.
The second thing is that some of your values aren’t exact matches; for example one
2.5 value might be
2.5 while another might be
2.49999. In this case they will round differently as
2.49999 is mathematically closer to the floor value (i.e.
2.0) than it is the ceiling value. This is why two values that look the same are being rounded differently, and the importance of using the “unrounded” values. I’ve attached an image that hopefully highlights what I’m talking about.
At the end of the day it might be worth developing your own rounding so that the numbers are being treated consistently as you need. Could be as simple as conducting two sets of rounding perhaps? Really depends on what you’re working with or your tolerances. In my industry (construction) there is functionally little difference between 3mm and 2mm so its not a problem if they round up or down. For something like Jewellery maybe you need more than that…
Hope this helps…