1 |
< |
/* Copyright (c) 1992 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
< |
/* SCCSid "$SunId$ LBL" */ |
3 |
> |
/* SCCSid "$SunId$ SGI" */ |
4 |
|
|
5 |
|
/* |
6 |
|
* random.h - header file for random(3) and urand() function. |
33 |
|
#endif |
34 |
|
|
35 |
|
#ifdef MC |
36 |
+ |
|
37 |
|
#define urand(i) frandom() |
38 |
+ |
#define initurand(n) (n) |
39 |
+ |
|
40 |
|
#else |
41 |
+ |
|
42 |
+ |
extern short *urperm; |
43 |
+ |
extern int urmask, initurand(); |
44 |
+ |
|
45 |
|
#define urand(i) ((urperm[(i)&urmask]+frandom())/(urmask+1)) |
39 |
– |
#endif |
46 |
|
|
47 |
< |
extern short *urperm; |
42 |
< |
extern int urmask; |
47 |
> |
#endif |