diff --git a/src/libnest2d/include/libnest2d/geometry_traits.hpp b/src/libnest2d/include/libnest2d/geometry_traits.hpp index 7ea4373398..f388e37b11 100644 --- a/src/libnest2d/include/libnest2d/geometry_traits.hpp +++ b/src/libnest2d/include/libnest2d/geometry_traits.hpp @@ -501,8 +501,9 @@ inline P _Box

::center() const BP2D_NOEXCEPT { using Coord = TCoord

; P ret = { // No rounding here, we dont know if these are int coords - Coord( (getX(minc) + getX(maxc)) / Coord(2) ), - Coord( (getY(minc) + getY(maxc)) / Coord(2) ) + // Doing the division like this increases the max range of x and y coord + getX(minc) / Coord(2) + getX(maxc) / Coord(2), + getY(minc) / Coord(2) + getY(maxc) / Coord(2) }; return ret;