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

Comparing ray/src/px/pcond3.c (file contents):
Revision 3.6 by greg, Fri Jan 10 16:48:21 1997 UTC vs.
Revision 3.7 by greg, Sat Jan 11 10:39:25 1997 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1996 Regents of the University of California */
1 > /* Copyright (c) 1997 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 185 | Line 185 | FILE   *fp;
185   {
186          double  b, s;
187          register int    i;
188 <        double  wlum, sf;
188 >        double  wlum, sf, dlum;
189  
190          sf = scalef*inpexp;
191          if (lumf == cielum) sf *= WHTEFFICACY;
192          s = (bwmax - bwmin)/HISTRES;
193          for (i = 0, b = bwmin + .5*s; i < HISTRES; i++, b += s) {
194                  wlum = Lb(b);
195 <                if (what2do&DO_LINEAR)
196 <                        fprintf(fp, "%e %e\n", wlum, sf*wlum);
197 <                else
195 >                if (what2do&DO_LINEAR) {
196 >                        dlum = sf*wlum;
197 >                        if (dlum > ldmax) dlum = ldmax;
198 >                        else if (dlum < ldmin) dlum = ldmin;
199 >                        fprintf(fp, "%e %e\n", wlum, dlum);
200 >                } else
201                          fprintf(fp, "%e %e\n", wlum, Lb(BLw(wlum)));
202          }
203   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines