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

Comparing ray/src/common/bsdf.c (file contents):
Revision 2.46 by greg, Thu Jul 4 15:14:45 2013 UTC vs.
Revision 2.47 by greg, Sun Mar 23 23:15:53 2014 UTC

# Line 790 | Line 790 | SDsampBSDF(SDValue *sv, FVECT ioVec, double randX, int
790                  randX -= sd->tLamb.cieY;
791          }
792                                          /* else one of cumulative dist. */
793 <        for (i = 0; i < n && randX < cdarr[i]->cTotal; i++)
793 >        for (i = 0; i < n && randX > cdarr[i]->cTotal; i++)
794                  randX -= cdarr[i]->cTotal;
795          if (i >= n)
796                  return SDEinternal;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines