Browse Source

numeric_limits<double>::min() is the minimal positive number (#1438)

Fixes #1411
Raymond Yun Fei 5 years ago
parent
commit
c1c88fd78b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      include/igl/copyleft/cgal/extract_cells.cpp

+ 2 - 2
include/igl/copyleft/cgal/extract_cells.cpp

@@ -1,7 +1,7 @@
 // This file is part of libigl, a simple c++ geometry processing library.
 //
 // Copyright (C) 2015 Qingnan Zhou <[email protected]>
-//
+// 
 // This Source Code Form is subject to the terms of the Mozilla Public License
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
@@ -200,7 +200,7 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells(
     DerivedV bbox_max(num_components, 3);
     // Assuming our mesh (in exact numbers) fits in the range of double.
     bbox_min.setConstant(std::numeric_limits<double>::max());
-    bbox_max.setConstant(std::numeric_limits<double>::min());
+    bbox_max.setConstant(std::numeric_limits<double>::lowest());
     // Loop over faces
     for (size_t i=0; i<num_faces; i++)
     {