File:  [Research Unix] / researchv10no / games / trek / ranf.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

ranf(max)
int	max;
{
	double	d;
	register int	t;

	if (max <= 0)
		return (0);
	d = rand()/32768.0;
	return(t = d*max);
}


double franf()
{
	double		t;
	t = rand();
	return (t / 32767.0);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.