From 5fe5bb049cb0e259b0b8df8487613293b55ba2ed Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 30 Apr 2021 09:27:21 +0200 Subject: [PATCH] Update Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp Co-authored-by: Sebastien Loriot --- .../hausdorff_bounded_error_distance_example.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp index 27adbf71733..3107e29fca1 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hausdorff_bounded_error_distance_example.cpp @@ -186,10 +186,9 @@ void moving_mesh_example( get_meshes(filepath1, filepath2, mesh1, mesh2); const auto bbox = PMP::bbox(mesh2); - const FT distance = static_cast(CGAL::sqrt(CGAL::to_double( - CGAL::squared_distance( + const FT distance = CGAL::approximate_sqrt(CGAL::squared_distance( Point_3(bbox.xmin(), bbox.ymin(), bbox.zmin()), - Point_3(bbox.xmax(), bbox.ymax(), bbox.zmax()))))); + Point_3(bbox.xmax(), bbox.ymax(), bbox.zmax()))); const FT t = FT(1) / FT(100); if (save) save_mesh(mesh2, "mesh-0");