Skip to content

Commit

Permalink
Switch to using GD for mean=0, since boost::random doesn't like mean=…
Browse files Browse the repository at this point in the history
…0 (even though it works)
  • Loading branch information
rmjarvis committed Dec 10, 2018
1 parent 96d454a commit 107d2f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ namespace galsim {

if (mean != _mean) {
_mean = mean;
if (mean > MAX_POISSON) setMeanGD(mean);
if (mean > MAX_POISSON || mean == 0.) setMeanGD(mean);
else setMeanPD(mean);
}
}
Expand Down

0 comments on commit 107d2f9

Please sign in to comment.