We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b5632a commit cce8428Copy full SHA for cce8428
libs/openFrameworks/utils/ofUtils.h
@@ -13,6 +13,7 @@
13
#include <algorithm>
14
#include <sstream>
15
#include <type_traits>
16
+#include <random>
17
18
/// \section Elapsed Time
19
/// \brief Reset the elapsed time counter.
@@ -225,7 +226,8 @@ int ofGetWeekday();
225
226
/// \sa http://www.cplusplus.com/reference/algorithm/random_shuffle/
227
template<class T>
228
void ofRandomize(std::vector<T>& values) {
- random_shuffle(values.begin(), values.end());
229
+ //switch from random_shuffle ( removed in some C++17 impl )
230
+ std::shuffle(values.begin(), values.end(), std::default_random_engine(0));
231
}
232
233
/// \brief Conditionally remove values from a vector.
0 commit comments