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

Comparing ray/src/hd/rholo2.c (file contents):
Revision 3.30 by greg, Fri Oct 5 19:19:16 2018 UTC vs.
Revision 3.31 by greg, Thu Apr 21 22:31:42 2022 UTC

# Line 216 | Line 216 | packrays(              /* pack ray origins and directions */
216          retry:
217                  if (useyelim) {
218                          initeyelim(&eyelim, NULL, gc+1);
219 <                        p->ra[i].r[0][0] = (int)(frandom()*rrng0[0][1])
220 <                                                + rrng0[0][0];
221 <                        p->ra[i].r[0][1] = (int)(frandom()*rrng0[1][1])
222 <                                                + rrng0[1][0];
219 >                        p->ra[i].r[0][0] = irandom(rrng0[0][1]) + rrng0[0][0];
220 >                        p->ra[i].r[0][1] = irandom(rrng0[1][1]) + rrng0[1][0];
221                          groweyelim(&eyelim, gc,
222                                          (1./256.)*(p->ra[i].r[0][0]+.5),
223                                          (1./256.)*(p->ra[i].r[0][1]+.5), 1);
# Line 232 | Line 230 | packrays(              /* pack ray origins and directions */
230   #endif
231                                  goto retry;
232                          }
233 <                        p->ra[i].r[1][0] = (int)(frandom()*rrng1[0][1])
234 <                                                + rrng1[0][0];
237 <                        p->ra[i].r[1][1] = (int)(frandom()*rrng1[1][1])
238 <                                                + rrng1[1][0];
233 >                        p->ra[i].r[1][0] = irandom(rrng1[0][1]) + rrng1[0][0];
234 >                        p->ra[i].r[1][1] = irandom(rrng1[1][1]) + rrng1[1][0];
235                  } else {
236 <                        p->ra[i].r[0][0] = frandom() * 256.;
237 <                        p->ra[i].r[0][1] = frandom() * 256.;
238 <                        p->ra[i].r[1][0] = frandom() * 256.;
239 <                        p->ra[i].r[1][1] = frandom() * 256.;
236 >                        p->ra[i].r[0][0] = random() & 0xff;
237 >                        p->ra[i].r[0][1] = random() & 0xff;
238 >                        p->ra[i].r[1][0] = random() & 0xff;
239 >                        p->ra[i].r[1][1] = random() & 0xff;
240                  }
241                  d = hdray(ro, rd, hdlist[p->hd], gc, p->ra[i].r);
242   #if 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines