1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-09-20 05:25:37 +01:00

fix in discrete random generator return type

This commit is contained in:
Antonin Portelli 2015-01-28 17:16:05 +00:00
parent 0e1ef33954
commit dd43786189

View File

@ -668,7 +668,7 @@ double RandGen::uniform(const double a, const double b)
return (b-a)*rx + a; 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))); return ((unsigned int)(uniform()*(double)(n)));
} }