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

Comparing ray/src/common/falsecolor.c (file contents):
Revision 3.7 by greg, Thu Jan 26 03:33:16 2006 UTC vs.
Revision 3.8 by greg, Thu Jul 3 03:30:21 2008 UTC

# Line 88 | Line 88 | fcLinearMapping(FCstruct *fcs, TMstruct *tms, double p
88          if ((fcs == NULL) | (tms == NULL) || (tms->histo == NULL) |
89                          (0 > pctile) | (pctile >= 50))
90                  return(TM_E_ILLEGAL);
91 <        i = (tms->hbrmin-MINBRT)/HISTEP;
91 >        i = HISTI(tms->hbrmin);
92          brt0 = MINBRT + HISTEP/2 + i*HISTEP;
93 <        histlen = (tms->hbrmax-MINBRT)/HISTEP + 1 - i;
93 >        histlen = HISTI(tms->hbrmax) + 1 - i;
94          histot = 0;
95          for (i = histlen; i--; )
96                  histot += tms->histo[i];
# Line 114 | Line 114 | fcLogMapping(FCstruct *fcs, TMstruct *tms, double pcti
114          if ((fcs == NULL) | (tms == NULL) || (tms->histo == NULL) |
115                          (.0 > pctile) | (pctile >= 50.))
116                  return(TM_E_ILLEGAL);
117 <        i = (tms->hbrmin-MINBRT)/HISTEP;
117 >        i = HISTI(tms->hbrmin);
118          brt0 = MINBRT + HISTEP/2 + i*HISTEP;
119 <        histlen = (tms->hbrmax-MINBRT)/HISTEP + 1 - i;
119 >        histlen = HISTI(tms->hbrmax) + 1 - i;
120          histot = 0;
121          for (i = histlen; i--; )
122                  histot += tms->histo[i];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines