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

Comparing ray/src/rt/rcontrib.c (file contents):
Revision 2.18 by greg, Thu Nov 15 19:41:03 2012 UTC vs.
Revision 2.19 by greg, Sat Jul 19 00:07:03 2014 UTC

# Line 216 | Line 216 | static void
216   trace_contrib(RAY *r)
217   {
218          MODCONT *mp;
219 +        double  bval;
220          int     bn;
221          RREAL   contr[3];
222  
# Line 231 | Line 232 | trace_contrib(RAY *r)
232                  return;
233  
234          worldfunc(RCCONTEXT, r);                /* else get bin number */
235 <        bn = (int)(evalue(mp->binv) + .5);
236 <        if ((bn < 0) | (bn >= mp->nbins)) {
235 >        if ((bval = evalue(mp->binv)) <= -.5)
236 >                return;                         /* silently ignore */
237 >        if ((bn = (int)(bval + .5)) >= mp->nbins) {
238                  error(WARNING, "bad bin number (ignored)");
239                  return;
240          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines