| 553 | */ |
| 554 | template <typename T> |
| 555 | T random(const T min, const T max) |
| 556 | { |
| 557 | static std::random_device rand_device; |
| 558 | static std::mt19937_64 twister(rand_device()); |
| 559 | std::uniform_int_distribution<T> dist(min, max); |
| 560 | return dist(twister); |
| 561 | } |
| 562 | |
| 563 | /** |
| 564 | * @brief Obtain an ordered pair of two distinct random numbers in a specified range. |
no outgoing calls
no test coverage detected