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 1, Mon Feb 10 17:09:07 2014 UTC revision 12, Fri Jul 24 18:36:24 2015 UTC
# Line 114  Line 114 
114  }  }
115    
116  /**  /**
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) {
123      int r = rand_r(seed);
124      double k = r % 32767;
125      return (k / 32767.0);
126    }
127    
128    /**
129   * \brief This function will calculate the calculate the effective annual mortality caused by a given predation on a specified population during a timestep   * \brief This function will calculate the calculate the effective annual mortality caused by a given predation on a specified population during a timestep
130   * \param pred is the number that is removed from the population by the predation   * \param pred is the number that is removed from the population by the predation
131   * \param pop is the population size (before predation)   * \param pop is the population size (before predation)

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

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

Powered By FusionForge