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

Comparing ray/src/common/multisamp.c (file contents):
Revision 2.5 by schorsch, Sat Jun 7 12:50:20 2003 UTC vs.
Revision 2.6 by greg, Wed Apr 17 15:07:29 2024 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13  
14   #include "random.h"
15  
16 +
17 + /* Convert 1-dimensional sample to N dimensions */
18   void
19 < multisamp(t, n, r)      /* convert 1-dimensional sample to N dimensions */
18 < double  t[];                    /* returned N-dimensional vector */
19 < register int    n;              /* number of dimensions */
20 < double  r;                      /* 1-dimensional sample [0,1) */
19 > multisamp(double t[], int n, double r)
20   {
21          int     j;
22 <        register int    i, k;
22 >        int     i, k;
23          int     ti[8];
24          double  s;
25  
# Line 37 | Line 36 | double r;                      /* 1-dimensional sample [0,1) */
36          }
37          i = n;
38          while (i-- > 0)
39 <                t[i] = 1./256. * (ti[i] + frandom());
39 >                t[i] = (1./256.) * (ti[i] + frandom());
40   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines