ftp.nice.ch/pub/next/unix/audio/cmix.s.tar.gz#/cmix/lib/rrand.m

This is rrand.m in view mode; [Download] [Up]

/* a modification of unix rand() to return floating point values between
   + and - 1. */

static	long	randx = 1;

srrand(x)
unsigned x;
{
	randx = x;
}
float rrand()
{
	int i = ((randx = randx*1103515245 + 12345)>>16) & 077777;
	return((float)i/16384. - 1.);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.