Function PGARandomUniform
Defined in File random.c
Function Documentation
-
double PGARandomUniform(PGAContext *ctx, double start, double end)
Return a uniform random number on the interval [start,end].
Example
Generate a uniform random number on the interval \([-0.5, 1.5]\)
PGAContext *ctx; double r; ... r = PGARandomUniform (ctx, -0.5, 1.5);
- Parameters:
ctx – context variable
start – starting (double) value of the interval
end – ending (double) value of the interval
- Returns:
A random number on the interval [start,end]