Mail Archives: djgpp/1999/12/09/02:46:39
These questions regarding random numbers are interesting so here is another
question. I feel sure there is a simple method. How to produce random number
generation on a series such as 4 - 24 but produce the random numbers as
multiples of 4. ie 8, 20, 4, 16 etc.
Regards Pete
Stefan Viljoen wrote:
> Mark Simmons <zack97 AT localnet DOT com> wrote in message
> news:384F1689 DOT B435CCDF AT localnet DOT com...
> > How do I get a number that will be psuedo random? time(null) % max
> > doesn't work because the numbers need to be read in quick succession and
> > it simply produces a 1,2,3,4,5,6,7,8,9...0,1,2.... etc. pattern.. So,
> > how do I get a number that seems sort of random with a variable max?
>
> How about using a faster running timer to seed the generator...?
>
> --
> This message courtesy of
> RylanNet rylan AT intekom DOT co DOT za
> http://home.intekom.com/rylan/
> --
> StarWars for ever!.
- Raw text -