You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
348 B

#pragma once
#include <random>
namespace ZXing {
class PseudoRandom {
std::minstd_rand _random;
public:
PseudoRandom(size_t seed) : _random(static_cast<std::minstd_rand::result_type>(seed)) {}
template <typename IntType>
IntType next(IntType low, IntType high) {
return std::uniform_int_distribution<IntType>(low, high)(_random);
}
};
}