| # | Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL"; | |
|---|---|---|
| 12 | ||
| 13 | #include <stdio.h> | |
| 14 | ||
| 15 | + | #include <math.h> |
| 16 | + | |
| 17 | #include "random.h" | |
| 18 | ||
| 17 | – | #ifndef atof |
| 18 | – | extern double atof(); |
| 19 | – | #endif |
| 20 | – | |
| 19 | #define PI 3.14159265359 | |
| 20 | ||
| 21 | typedef double FVECT[3]; | |
| # | Line 75 | Line 73 | bubble(v, cent, rad, bubrad) /* compute location of ra | |
| 73 | FVECT v, cent; | |
| 74 | double rad, bubrad; | |
| 75 | { | |
| 78 | – | double sqrt(); |
| 76 | double r, ro, theta, phi; | |
| 77 | ||
| 78 | r = frandom()*bubrad; | |
| # | Line 92 | Line 89 | sphere_cart(v, ro, theta, phi) /* spherical to cartesi | |
| 89 | FVECT v; | |
| 90 | double ro, theta, phi; | |
| 91 | { | |
| 95 | – | double sin(), cos(); |
| 92 | double d; | |
| 93 | ||
| 94 | d = sin(phi); | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |