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

Comparing ray/src/rt/m_brdf.c (file contents):
Revision 2.3 by greg, Tue Jun 30 18:28:22 1992 UTC vs.
Revision 2.4 by greg, Wed Oct 14 12:30:54 1992 UTC

# Line 267 | Line 267 | register RAY  *r;
267                                  for (i = 0; i < 3; i++) /* perturb direction */
268                                          sr.rdir[i] = r->rdir[i] -
269                                                          .75*r->pert[i];
270 <                                normalize(sr.rdir);
270 >                                if (normalize(sr.rdir) == 0.0) {
271 >                                        objerror(m, WARNING, "illegal perturbation");
272 >                                        VCOPY(sr.rdir, r->rdir);
273 >                                }
274                          } else {
275                                  VCOPY(sr.rdir, r->rdir);
276                                  transtest = 2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines