ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/pmapdump.c
(Generate patch)

Comparing ray/src/rt/pmapdump.c (file contents):
Revision 2.1 by greg, Tue Feb 24 19:39:27 2015 UTC vs.
Revision 2.2 by greg, Tue Apr 21 19:16:51 2015 UTC

# Line 18 | Line 18
18   #include "rtio.h"
19   #include "resolu.h"
20   #include "random.h"
21 + #include "math.h"
22  
23  
24   /* Defaults */
# Line 166 | Line 167 | int main (int argc, char** argv)
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines