Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libs/openFrameworks/utils/ofUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <algorithm>
#include <sstream>
#include <type_traits>
#include <random>

/// \section Elapsed Time
/// \brief Reset the elapsed time counter.
Expand Down Expand Up @@ -225,7 +226,8 @@ int ofGetWeekday();
/// \sa http://www.cplusplus.com/reference/algorithm/random_shuffle/
template<class T>
void ofRandomize(std::vector<T>& values) {
random_shuffle(values.begin(), values.end());
//switch from random_shuffle ( removed in some C++17 impl )
std::shuffle(values.begin(), values.end(), std::default_random_engine(0));
}

/// \brief Conditionally remove values from a vector.
Expand Down