Skip to content

Commit 3b29156

Browse files
committed
Bug solved: Shift before ceil was in the wrong direction
1 parent 5d3ec39 commit 3b29156

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/triangle_soup_snap_rounding.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ bool polygon_soup_snap_rounding(PointRange &points,
183183
auto snap = [](typename Kernel::FT x, double scale)
184184
{
185185
// Scale the coordinate, round to nearest integer and scale back
186-
return internal::ceil((x * scale) + 0.5) / scale;
186+
// TODO replace this ceil by the one of Algebraic_fondation when it will be add to master
187+
return internal::ceil((x * scale) - 0.5) / scale;
188+
// return ceil((x * scale) - 0.5) / scale;
187189
};
188190
auto snap_p = [scale, snap](const Point_3 &p)
189191
{

0 commit comments

Comments
 (0)