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

Comparing ray/src/util/rsensor.c (file contents):
Revision 2.12 by greg, Mon Sep 26 15:33:29 2011 UTC vs.
Revision 2.13 by greg, Wed Oct 16 04:35:50 2013 UTC

# Line 398 | Line 398 | init_ptable(
398                  tvals[i] = 1. - ( (1.-frac)*cos(thdiv[t]) +
399                                                  frac*cos(thdiv[t+1]) );
400                                  /* offset b/c sensor values are centered */
401 <                if (!t || (t < sntp[0]-1) & (frac >= 0.5))
402 <                        frac -= 0.5;
403 <                else {
401 >                if ((t < sntp[0]-1) & (frac >= 0.5)) {
402 >                        if ((frac -= 0.5) < 0)
403 >                                frac = 0;
404 >                } else {
405                          frac += 0.5;
406                          --t;
407                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines