I've noticed the newly added Rectangle::toNearestInt() function and I have some concerns regarding its implementation:
Imagine I have a Rectangle <float> having
x = 15.4
width = 4.4
This means that the right side of this rectangle lies at 19.8 ( = 15.4 + 4.4)
When rounding this rectangle to int, I'd expect the left side to snap at 15 (from 15.4) and the right side to snap at 20 (from 19.8).
With the current implementation, the left side would be snapped at 15 but the width would be snapped at 4, thus effectively bringing the right side to snap at 19 rather than 20.
What do you think about this?