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

Comparing ray/src/px/pf2.c (file contents):
Revision 2.8 by greg, Thu Jul 26 23:50:40 2018 UTC vs.
Revision 2.10 by greg, Thu Dec 7 21:15:54 2023 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   *  pf2.c - routines used by pfilt.
6   */
7  
8 #include  <stdio.h>
9 #include  <stdlib.h>
10 #include  <math.h>
11
12 #include  "rterror.h"
13 #include  "random.h"
14 #include  "color.h"
8   #include  "pfilt.h"
9 + #include  "random.h"
10  
17 #define  PI             3.14159265359
18 #define  FTINY          (1e-6)
19
11   #define  AVGLVL         0.5     /* target mean brightness */
12  
13   double  avgbrt;                 /* average picture brightness */
# Line 85 | Line 76 | pass1scan(             /* process first pass scanline */
76                          copycolor(hp->val, scan[x]);
77                          hp->x = x;
78                          hp->y = y;
79 <                        hp->slope = tan(PI*(0.5-(random()%npts+0.5)/npts));
79 >                        hp->slope = tan(PI*(0.5-(irandom(npts)+0.5)/npts));
80                          hp->next = head;
81                          head = hp;
82                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines