Zero is a normal mask value, not a wildcard.
[AROS.git] / compiler / alib / fastrand.c
blob5a128750736adc5fcafd878be27c2620b5df11d9
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*****************************************************************************
8 NAME */
9 #include <proto/alib.h>
11 ULONG FastRand (
13 /* SYNOPSIS */
14 ULONG seed)
16 /* FUNCTION
18 INPUTS
20 RESULT
22 NOTES
24 EXAMPLE
26 BUGS
28 SEE ALSO
30 INTERNALS
32 HISTORY
33 06.12.96 digulla Created after original from libnix
35 ******************************************************************************/
37 ULONG a = seed << 1;
39 if ((LONG)seed <= 0)
40 a ^= 0x1d872b41;
42 return a;
43 } /* FastRand */