Once again, take srand()/random() out of the initialization chain.
They have exactly the wrong kind of randomness for this job - not returning consistent sequences across different platforms or C library versions, and because pseodorandom not really better than sampling the clock.
This commit is contained in:
parent
6146406990
commit
6ba9a7de7f
3 changed files with 6 additions and 7 deletions
2
misc.h
2
misc.h
|
@ -73,6 +73,6 @@ extern long fIABS(long);
|
|||
#define IABS(N) fIABS(N)
|
||||
extern long fMOD(long,long);
|
||||
#define MOD(N,M) fMOD(N,M)
|
||||
extern void set_seed_from_time(void);
|
||||
extern void set_seed(long);
|
||||
extern unsigned long get_next_lcg_value(void);
|
||||
extern long randrange(long);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue