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.50 by greg, Sat May 4 00:36:58 2019 UTC vs.
Revision 2.51 by greg, Thu May 14 20:49:57 2020 UTC

# Line 272 | Line 272 | FVECT  p
272                  d = DOT(disp,v->hvec);
273                  d2 = DOT(disp,v->vdir);
274                  ip[0] = 180.0/PI * atan2(d,d2) / v->horiz + 0.5 - v->hoff;
275 <                d = d*d + d2*d2;
276 <                if (d <= FTINY*FTINY)
275 >                d2 = d*d + d2*d2;
276 >                if (d2 <= FTINY*FTINY)
277                          return(VL_BAD); /* at pole */
278 <                if ((v->vaft > FTINY) & (d >= v->vaft*v->vaft))
278 >                if ((v->vaft > FTINY) & (d2 >= v->vaft*v->vaft))
279                          rflags |= VL_BEYOND;
280 <                d = 1.0/sqrt(d);
280 >                d = 1.0/sqrt(d2);
281                  ip[1] = DOT(disp,v->vvec)*d/v->vn2 + 0.5 - v->voff;
282                  ip[2] = VLEN(disp);
283                  ip[2] *= (1.0 - v->vfore*d);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines