diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Finite_difference_gradient_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Finite_difference_gradient_3.h index 27ee190dcd8..e3ec1c17020 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/Finite_difference_gradient_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/Finite_difference_gradient_3.h @@ -91,7 +91,9 @@ public: const FT gy = (m_func(p2) - m_func(p3)) * m_den; const FT gz = (m_func(p4) - m_func(p5)) * m_den; - return vector(gx, gy, gz); + const FT n = CGAL::approximate_sqrt(CGAL::square(gx) + CGAL::square(gy) + CGAL::square(gz)); + + return vector(gx / n, gy / n, gz / n); } };