fix number to add in error diffusion

This commit is contained in:
Lingjie Zhu 2018-08-22 21:09:34 +08:00
parent e96a8a6d8e
commit 30d6058bf1
1 changed files with 1 additions and 1 deletions

View File

@ -528,7 +528,7 @@ public:
const double to_add = (residual + CGAL::to_double(px_error[i].err)) / avg_error; const double to_add = (residual + CGAL::to_double(px_error[i].err)) / avg_error;
const double to_add_round_up = std::floor(to_add + 0.5); const double to_add_round_up = std::floor(to_add + 0.5);
residual = (to_add - to_add_round_up) * avg_error; residual = (to_add - to_add_round_up) * avg_error;
num_to_add[i] = static_cast<std::size_t>(to_add_round_up); num_to_add[px_error[i].px] = static_cast<std::size_t>(to_add_round_up);
} }
#ifdef CGAL_SURFACE_MESH_APPROXIMATION_DEBUG #ifdef CGAL_SURFACE_MESH_APPROXIMATION_DEBUG