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; |
92 |
< |
brt0 = MINBRT + HISTEP/2 + i*HISTEP; |
93 |
< |
histlen = (tms->hbrmax-MINBRT)/HISTEP + 1 - i; |
91 |
> |
i = HISTI(tms->hbrmin); |
92 |
> |
brt0 = HISTV(i); |
93 |
> |
histlen = HISTI(tms->hbrmax) + 1 - i; |
94 |
|
histot = 0; |
95 |
|
for (i = histlen; i--; ) |
96 |
|
histot += tms->histo[i]; |
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; |
118 |
< |
brt0 = MINBRT + HISTEP/2 + i*HISTEP; |
119 |
< |
histlen = (tms->hbrmax-MINBRT)/HISTEP + 1 - i; |
117 |
> |
i = HISTI(tms->hbrmin); |
118 |
> |
brt0 = HISTV(i); |
119 |
> |
histlen = HISTI(tms->hbrmax) + 1 - i; |
120 |
|
histot = 0; |
121 |
|
for (i = histlen; i--; ) |
122 |
|
histot += tms->histo[i]; |