Yucheol Jung 6 năm trước cách đây
mục cha
commit
7a56aaf0cc
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      include/igl/randperm.cpp

+ 1 - 1
include/igl/randperm.cpp

@@ -20,7 +20,7 @@ IGL_INLINE void igl::randperm(
   I = II;
   std::random_device rd;
   std::mt19937 mt(rd());
-  std::random(I.data(),I.data()+n, mt);
+  std::shuffle(I.data(),I.data()+n, mt);
 }
 
 #ifdef IGL_STATIC_LIBRARY