https://github.com/tskit-dev/msprime
Raw File
Tip revision: becc7b948123f8683c49ed41480ca2682d979a7f authored by Yan Wong on 09 December 2022, 18:50:12 UTC
Update docs/mutations.md
Tip revision: becc7b9
rand2t.c
/*  Link in this file for random number generation with rand()
     and seeding from the clock  */

#include <stdio.h>
#include <stdlib.h>

	double
ran1()
{
	int rand();
	return( rand()/(RAND_MAX+1.0)  );
}


	void seedit( const char *flag)
{
	FILE *fopen(), *pfseed;
	unsigned int seed2 ;

  if( flag[0] == 's' ) {
	srand( seed2 = time(NULL) ) ;
        printf("\n%d\n", seed2 );    
	}

}
back to top