summaryrefslogtreecommitdiff
path: root/utils/sampler.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/sampler.h')
-rw-r--r--utils/sampler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/sampler.h b/utils/sampler.h
index 153e7ef1..22c873d4 100644
--- a/utils/sampler.h
+++ b/utils/sampler.h
@@ -48,7 +48,7 @@ struct RandomNumberGenerator {
template <typename F>
size_t SelectSample(const F& a, const F& b, double T = 1.0) {
if (T == 1.0) {
- if (this->next() > (a / (a + b))) return 1; else return 0;
+ if (F(this->next()) > (a / (a + b))) return 1; else return 0;
} else {
assert(!"not implemented");
}