Browse Source

bug

Former-commit-id: 30a4fac83a6d879553e87ce7c7e58f8789460710
Alec Jacobson 8 năm trước cách đây
mục cha
commit
900b3098c6

+ 1 - 1
include/igl/copyleft/cgal/point_segment_squared_distance.cpp

@@ -23,7 +23,7 @@ IGL_INLINE void igl::copyleft::cgal::point_segment_squared_distance(
   // http://stackoverflow.com/a/1501725/148668
   const auto sqr_len = S2.squared_length();
   assert(sqr_len != 0);
-  const auto & V = S1.source();
+  const auto & V = S2.source();
   const auto & W = S2.target();
   const auto t = (P1-V).dot(W-V)/sqr_len;
   if(t<0)