diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index 6ea15ec5ad7..344774166cd 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -2091,6 +2091,7 @@ insert_balls(const Vertex_handle& vp, // n = 2(d-sq) / (sp+sq) // ======================= + const FT d_signF = static_cast(d_sign); int n = static_cast(std::floor(FT(2)*(d-sq) / (sp+sq))+.5); // if(minimal_weight_ != 0 && n == 0) return; @@ -2113,10 +2114,8 @@ insert_balls(const Vertex_handle& vp, curve_index, d_sign) << ")\n"; #endif - const FT sgn = (d_sign == CGAL::POSITIVE) ? 1. - : (d_sign == CGAL::NEGATIVE ? -1. : 0.); const Bare_point new_point = - domain_.construct_point_on_curve(vpp, curve_index, sgn * d / 2); + domain_.construct_point_on_curve(vpp, curve_index, d_signF * d / 2); const int dim = 1; // new_point is on edge const Index index = domain_.index_from_curve_index(curve_index); const FT point_weight = CGAL::square(size_(new_point, dim, index)); @@ -2162,7 +2161,6 @@ insert_balls(const Vertex_handle& vp, FT norm_step_size = dleft_frac * step_size; // Initial distance - FT d_signF = static_cast(d_sign); FT pt_dist = d_signF * norm_step_size; Vertex_handle prev = vp;