diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Octree.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Octree.h index 9d855d66792..6426d833232 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Octree.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Octree.h @@ -622,12 +622,12 @@ namespace CGAL { } const Bbox_3 &buildBoundingCube() { - FT min[] = {(std::numeric_limits::max)(), - (std::numeric_limits::max)(), - (std::numeric_limits::max)()}; - FT max[] = {(std::numeric_limits::min)(), - (std::numeric_limits::min)(), - (std::numeric_limits::min)()}; + FT min[] = {std::numeric_limits::infinity(), + std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + FT max[] = {-std::numeric_limits::infinity(), + -std::numeric_limits::infinity(), + -std::numeric_limits::infinity()}; for (std::size_t i = 0;isize();i++) { Point_3 p = get(m_point_pmap, *this->at(i)); diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/point_inside_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/point_inside_example.cpp index 0a91266b1f7..253ddf253dc 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/point_inside_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/point_inside_example.cpp @@ -17,7 +17,7 @@ typedef CGAL::Polyhedron_3 Polyhedron; double max_coordinate(const Polyhedron& poly) { - double max_coord = (std::numeric_limits::min)(); + double max_coord = -std::numeric_limits::infinity(); BOOST_FOREACH(Polyhedron::Vertex_handle v, vertices(poly)) { Point p = v->point(); diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/point_inside_example_OM.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/point_inside_example_OM.cpp index 14b45fba66d..fa04004c34d 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/point_inside_example_OM.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/point_inside_example_OM.cpp @@ -26,7 +26,7 @@ double max_coordinate(const Mesh& mesh) typedef boost::property_map::type VPmap; VPmap vpmap = get(CGAL::vertex_point,mesh); - double max_coord = std::numeric_limits::min(); + double max_coord = -std::numeric_limits::infinity(); BOOST_FOREACH(vertex_descriptor v, vertices(mesh)) { Point p = get(vpmap, v); diff --git a/Surface_mesh_parameterization/include/CGAL/Two_vertices_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Two_vertices_parameterizer_3.h index 783884f8d4f..26f83996727 100644 --- a/Surface_mesh_parameterization/include/CGAL/Two_vertices_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Two_vertices_parameterizer_3.h @@ -129,12 +129,12 @@ Two_vertices_parameterizer_3::parameterize_border(Adaptor& mesh) return Parameterizer_traits_3::ERROR_BORDER_TOO_SHORT; // Get mesh's bounding box - double xmin = (std::numeric_limits::max)() ; - double ymin = (std::numeric_limits::max)() ; - double zmin = (std::numeric_limits::max)() ; - double xmax = (std::numeric_limits::min)() ; - double ymax = (std::numeric_limits::min)() ; - double zmax = (std::numeric_limits::min)() ; + double xmin = std::numeric_limits::infinity(); + double ymin = std::numeric_limits::infinity(); + double zmin = std::numeric_limits::infinity(); + double xmax = -std::numeric_limits::infinity(); + double ymax = -std::numeric_limits::infinity(); + double zmax = -std::numeric_limits::infinity(); for (it = mesh.mesh_vertices_begin(); it != mesh.mesh_vertices_end(); it++) { Point_3 position = mesh.get_vertex_position(it); @@ -226,10 +226,11 @@ Two_vertices_parameterizer_3::parameterize_border(Adaptor& mesh) // Project onto longest bounding box axes, // Set extrema vertices' (u,v) in unit square and mark them as "parameterized" Vertex_handle vxmin = NULL ; - double umin = (std::numeric_limits::max)() ; - double vmin = (std::numeric_limits::max)(), vmax= (std::numeric_limits::min)(); Vertex_handle vxmax = NULL ; - double umax = (std::numeric_limits::min)() ; + double umin = std::numeric_limits::infinity(); + double umax = -std::numeric_limits::infinity(); + double vmin = std::numeric_limits::infinity(); + double vmax = -std::numeric_limits::infinity(); for (it = mesh.mesh_vertices_begin(); it != mesh.mesh_vertices_end(); it++) { Point_3 position = mesh.get_vertex_position(it);