--- trunk/gadget/mathfunc.h 2015/07/23 19:00:38 11 +++ trunk/gadget/mathfunc.h 2015/07/24 18:36:24 12 @@ -113,9 +113,13 @@ return (k / 32767.0); } -//FIXME doc +/** + * \brief This function will generate a random number in the range 0.0 to 1.0 from a seed + * \param seed the seed used to calculate the rando number + * \return random number + * \note This function generates uniformly-distributed doubles in the range 0.0 to 1.0 + */ inline double randomNumber(unsigned* seed) { -// cout << "RN:" << *seed << endl;; int r = rand_r(seed); double k = r % 32767; return (k / 32767.0);