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

Comparing ray/src/cv/bsdfinterp.c (file contents):
Revision 2.14 by greg, Tue Oct 22 04:29:27 2013 UTC vs.
Revision 2.15 by greg, Wed Oct 23 03:41:39 2013 UTC

# Line 94 | Line 94 | on_edge(const MIGRATION *ej, const FVECT ivec)
94          cos_a = DOT(ej->rbfv[0]->invec, ivec);
95          if (cos_a <= 0)
96                  return(0);
97 +        if (cos_a >= 1.)                /* handles rounding error */
98 +                return(1);
99  
100          cos_b = DOT(ej->rbfv[1]->invec, ivec);
101          if (cos_b <= 0)
102                  return(0);
103 +        if (cos_b >= 1.)
104 +                return(1);
105  
106          cos_aplusb = cos_a*cos_b - sqrt((1.-cos_a*cos_a)*(1.-cos_b*cos_b));
107          if (cos_aplusb <= 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines