Hotfix for arrange not working for objects with huge translation.

This commit is contained in:
tamasmeszaros 2021-06-28 14:55:15 +02:00
parent 77e25c5022
commit 92cf46773a

View File

@ -501,8 +501,9 @@ inline P _Box<P>::center() const BP2D_NOEXCEPT {
using Coord = TCoord<P>; using Coord = TCoord<P>;
P ret = { // No rounding here, we dont know if these are int coords P ret = { // No rounding here, we dont know if these are int coords
Coord( (getX(minc) + getX(maxc)) / Coord(2) ), // Doing the division like this increases the max range of x and y coord
Coord( (getY(minc) + getY(maxc)) / Coord(2) ) getX(minc) / Coord(2) + getX(maxc) / Coord(2),
getY(minc) / Coord(2) + getY(maxc) / Coord(2)
}; };
return ret; return ret;