ソースを参照

Subtle bug fixed. So many doubles between floats.

Former-commit-id: 4e7f666e7e501cd69cb1b6a57922ca78e02a02d7
Qingnan Zhou 9 年 前
コミット
36c40b6fec
1 ファイル変更2 行追加2 行削除
  1. 2 2
      include/igl/copyleft/cgal/assign_scalar.cpp

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

@@ -38,10 +38,10 @@ IGL_INLINE void igl::copyleft::cgal::assign_scalar(
   const auto interval = CGAL::to_interval(cgal);
   d = interval.first;
   do {
-      const float next = nextafter(d, interval.second);
+      const float next = nextafter(d, float(interval.second));
       if (CGAL::abs(cgal-d) < CGAL::abs(cgal-next)) break;
       d = next;
-  } while (d < interval.second);
+  } while (d < float(interval.second));
 }
 
 IGL_INLINE void igl::copyleft::cgal::assign_scalar(