/************************************************************************/
/*                                                                      */
/* Copyright (c) 1988 -                                                 */
/*     The Rector and Visitors of the University of Virginia            */
/*                                                                      */
/* This code may not be distributed further without permission          */
/*      from the University of Virginia.                                */
/* This code is distributed WITHOUT ANY WARRANTY.  No claims are        */
/*      made as to whether it serves any particular purpose or even     */
/*      works at all.                                                   */
/*                                                                      */
/************************************************************************/

#define RAND_A 62605
#define RAND_C 113218009
#define RAND_M 536870912

static unsigned r_seed=7774755;

double
RT_random()
{
	r_seed = (r_seed * RAND_A + RAND_C) % RAND_M;
	return ((double)r_seed / (double) RAND_M);
}

RT_seed(i)
	unsigned i;
{
	r_seed = i;
}
