Skip to content

Commit

Permalink
seed random number generator for test
Browse files Browse the repository at this point in the history
  • Loading branch information
dyollb committed Aug 20, 2024
1 parent 93b65c1 commit 1fa5215
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/src/poisson_disk_sampler_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ size_t sampleSquareDisk(double width, double sampling_distance) {
PoissonDiskOptions options;
options.rCoef = sampling_distance / meanEdgeLength;

// make tests reproducible
geometrycentral::util_mersenne_twister.seed(101);

PoissonDiskSampler sampler(*mesh, *geometry);
auto samples = sampler.sample(options);
return samples.size();
Expand Down

0 comments on commit 1fa5215

Please sign in to comment.