18 |
|
#include "rtio.h" |
19 |
|
#include "resolu.h" |
20 |
|
#include "random.h" |
21 |
+ |
#include "math.h" |
22 |
|
|
23 |
|
|
24 |
|
/* Defaults */ |
167 |
|
(= sphere distrib density ^-1/3) */ |
168 |
|
vol = (maxPos [0] - minPos [0]) * (maxPos [1] - minPos [1]) * |
169 |
|
(maxPos [2] - minPos [2]); |
170 |
< |
rad = radScale * RADCOEFF * cbrt(vol / numSpheres); |
170 |
> |
rad = radScale * RADCOEFF * pow(vol / numSpheres, 1./3.); |
171 |
|
|
172 |
|
/* Photon dump probability to satisfy target sphere count */ |
173 |
|
dumpRatio = numSpheres < numPhotons ? (float)numSpheres / numPhotons |