Skip to content

Commit

Permalink
Update src/libutil/rng.hh
Browse files Browse the repository at this point in the history
Co-authored-by: Eelco Dolstra <[email protected]>
  • Loading branch information
bryanhonof and edolstra authored Oct 6, 2024
1 parent 0b0d5d8 commit 9dc7cd5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/libutil/rng.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ struct RandomNumberGenerator
{
public:
using limits = std::numeric_limits<T>;
RandomNumberGenerator()
: engine(std::random_device{}())
, dist(limits::min(), limits::max()){};
RandomNumberGenerator(T low, T high)
RandomNumberGenerator(T low = limits::min(), T high = limits::max())
: engine(std::random_device{}())
, dist(low, high){};
RandomNumberGenerator(std::seed_seq seed, T low, T high)
Expand Down

0 comments on commit 9dc7cd5

Please sign in to comment.