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

Comparing ray/src/common/image.c (file contents):
Revision 2.5 by greg, Tue Sep 8 10:04:30 1992 UTC vs.
Revision 2.6 by greg, Sat Dec 5 16:23:37 1992 UTC

# Line 148 | Line 148 | double  x, y;
148                  if (d > 1.0)
149                          return(-1);
150                  VCOPY(orig, v->vp);
151                if (d <= FTINY) {
152                        VCOPY(direc, v->vdir);
153                        return(0);
154                }
151                  d = sqrt(d);
152                  z = cos(PI*d);
153 <                d = sqrt(1 - z*z)/d;
153 >                d = d <= FTINY ? PI : sqrt(1 - z*z)/d;
154                  x *= d;
155                  y *= d;
156                  direc[0] = z*v->vdir[0] + x*v->hvec[0] + y*v->vvec[0];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines