The numbers are random, so there is just as big a chance of RandomRange(0,1000) returning 599, as there is for it returning 1, the chance in this case for any number from 0, to 999 is "1 in 1000". If you add another Random(50) to that.. you simply write RandomRange(0,1050) in a more clumsy way, as mentioned. It does not make it "
more random",
random+random=random no matter what you do.
An alternative to a random number, is to use a gaussian function to produce a normally distributed number, a number that usually ends up as `mean` +/- the `standard deviation`, but it has the property to generate
peaks that are (much) further away then the standard dev, making it very optimal for things like these.
Simba Code:
(*
Mu is the mean, sigma is the standard deviation.
*)
procedure GaussWait(Mu,Sigma:Double; vmin:Double=30);
var t,g:Double;
begin
t := 2 * PI * Random();
g := mu + (sigma * Sqrt(-2 * Ln(Random()))) * Cos(t);
// WriteLn('Waiting: ', Round( MaxE(g,vmin) ),'ms');
Wait(Round(MaxE(g,vmin)));
end;
begin
//wait normally around 700ms +/- 200ms, except for peaks which will/can go far above, or far below.
GaussWait(700,200);
end.
The example code, could peak as low as 30 (a limit is set), and over 1600ms, but usually ends up between 500 and 900ms.