--- trunk/gadget/mathfunc.h 2014/02/10 17:09:07 1 +++ trunk/gadget/mathfunc.h 2015/07/23 19:00:38 11 @@ -113,6 +113,14 @@ return (k / 32767.0); } +//FIXME doc +inline double randomNumber(unsigned* seed) { +// cout << "RN:" << *seed << endl;; + int r = rand_r(seed); + double k = r % 32767; + return (k / 32767.0); +} + /** * \brief This function will calculate the calculate the effective annual mortality caused by a given predation on a specified population during a timestep * \param pred is the number that is removed from the population by the predation