#include "random.qh"
+ERASEABLE
void RandomSelection_Init()
{
RandomSelection_totalweight = 0;
RandomSelection_best_priority = -1;
}
+ERASEABLE
void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority)
{
if (priority > RandomSelection_best_priority)
float DistributeEvenly_amount;
float DistributeEvenly_totalweight;
+ERASEABLE
void DistributeEvenly_Init(float amount, float totalweight)
{
if (DistributeEvenly_amount)
DistributeEvenly_totalweight = totalweight;
}
+ERASEABLE
float DistributeEvenly_Get(float weight)
{
float f;
return f;
}
+ERASEABLE
float DistributeEvenly_GetRandomized(float weight)
{
float f;
// from the GNU Scientific Library
float gsl_ran_gaussian_lastvalue;
float gsl_ran_gaussian_lastvalue_set;
+ERASEABLE
float gsl_ran_gaussian(float sigma)
{
if (gsl_ran_gaussian_lastvalue_set)