Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Diff of /trunk/gadget/mathfunc.h
[mareframe] / trunk / gadget / mathfunc.h Repository:
ViewVC logotype

Diff of /trunk/gadget/mathfunc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 11, Thu Jul 23 19:00:38 2015 UTC revision 12, Fri Jul 24 18:36:24 2015 UTC
# Line 113  Line 113 
113    return (k / 32767.0);    return (k / 32767.0);
114  }  }
115    
116  //FIXME doc  /**
117     * \brief This function will generate a random number in the range 0.0 to 1.0 from a seed
118     * \param seed the seed used to calculate the rando number
119     * \return random number
120     * \note This function generates uniformly-distributed doubles in the range 0.0 to 1.0
121     */
122  inline double randomNumber(unsigned* seed) {  inline double randomNumber(unsigned* seed) {
 //      cout << "RN:" << *seed << endl;;  
123    int r = rand_r(seed);    int r = rand_r(seed);
124    double k = r % 32767;    double k = r % 32767;
125    return (k / 32767.0);    return (k / 32767.0);

Legend:
Removed from v.11  
changed lines
  Added in v.12

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge