13016Swollman/*
23016Swollman * Copyright (c) 1993 Martin Birgmeier
33016Swollman * All rights reserved.
43016Swollman *
53016Swollman * You may redistribute unmodified or modified versions of this source
63016Swollman * code provided that the above copyright notice and this and the
73016Swollman * following conditions are retained.
83016Swollman *
93016Swollman * This software is provided ``as is'', and comes with no warranties
103016Swollman * of any kind. I shall in no event be liable for anything that happens
113016Swollman * to anyone/anything when using this software.
123016Swollman */
133016Swollman
143016Swollman#include "rand48.h"
153016Swollman
163016Swollmanextern unsigned short _rand48_seed[3];
173016Swollmanextern unsigned short _rand48_mult[3];
183016Swollmanextern unsigned short _rand48_add;
193016Swollman
203016Swollmanvoid
213016Swollmansrand48(long seed)
223016Swollman{
233016Swollman	_rand48_seed[0] = RAND48_SEED_0;
243016Swollman	_rand48_seed[1] = (unsigned short) seed;
253016Swollman	_rand48_seed[2] = (unsigned short) (seed >> 16);
263016Swollman	_rand48_mult[0] = RAND48_MULT_0;
273016Swollman	_rand48_mult[1] = RAND48_MULT_1;
283016Swollman	_rand48_mult[2] = RAND48_MULT_2;
293016Swollman	_rand48_add = RAND48_ADD;
303016Swollman}
31