From dd4378618915d867b0de7393a13c26c2d3c7699e Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Wed, 28 Jan 2015 17:16:05 +0000 Subject: [PATCH] fix in discrete random generator return type --- lib/RandGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RandGen.cpp b/lib/RandGen.cpp index caff086..141ae8d 100644 --- a/lib/RandGen.cpp +++ b/lib/RandGen.cpp @@ -668,7 +668,7 @@ double RandGen::uniform(const double a, const double b) return (b-a)*rx + a; } -double RandGen::discreteUniform(const unsigned int n) +unsigned int RandGen::discreteUniform(const unsigned int n) { return ((unsigned int)(uniform()*(double)(n))); }