ソースを参照

First evaluate exact number into copy before constructing interval for seach

Former-commit-id: 5c7f1ce008e3d35f1ba4bcfa1994172289360985
Alec Jacobson 9 年 前
コミット
5cf518c27a
1 ファイル変更3 行追加1 行削除
  1. 3 1
      include/igl/copyleft/cgal/assign_scalar.cpp

+ 3 - 1
include/igl/copyleft/cgal/assign_scalar.cpp

@@ -15,9 +15,11 @@ IGL_INLINE void igl::copyleft::cgal::assign_scalar(
 }
 
 IGL_INLINE void igl::copyleft::cgal::assign_scalar(
-  const typename CGAL::Epeck::FT & cgal,
+  const typename CGAL::Epeck::FT & _cgal,
   double & d)
 {
+  // FORCE evaluation of the exact type otherwise interval might be huge.
+  const typename CGAL::Epeck::FT cgal = _cgal.exact();
   const auto interval = CGAL::to_interval(cgal);
   d = interval.first;
   do {