Skip to content

Commit

Permalink
now it's more random
Browse files Browse the repository at this point in the history
  • Loading branch information
alysssssa committed May 2, 2023
1 parent 023bc64 commit 04a66f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion raytracer/raytracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ inline double degrees_to_radians(double degrees) {
inline double random_double() {
// random number in [0,1)
static std::uniform_real_distribution<double> distribution(0.0,1.0);
static std::mt19937 generator;
static std::random_device dev;
static std::mt19937 generator(dev());
return distribution(generator);
}

Expand Down

0 comments on commit 04a66f9

Please sign in to comment.