Mercurial > hg > svcore
comparison base/ColumnOp.h @ 1253:303039dd9e05 3.0-integration
Fix omitted topmost bin
author | Chris Cannam |
---|---|
date | Fri, 04 Nov 2016 16:44:59 +0000 |
parents | 6f7a440b6218 |
children | e2e66bfd4a88 |
comparison
equal
deleted
inserted
replaced
1252:2ff5e411151d | 1253:303039dd9e05 |
---|---|
192 } else { // not interpolating this one | 192 } else { // not interpolating this one |
193 | 193 |
194 int by0 = int(sy0 + 0.0001); | 194 int by0 = int(sy0 + 0.0001); |
195 int by1 = int(sy1 + 0.0001); | 195 int by1 = int(sy1 + 0.0001); |
196 if (by1 < by0 + 1) by1 = by0 + 1; | 196 if (by1 < by0 + 1) by1 = by0 + 1; |
197 if (by1 >= bins) by1 = by1 - 1; | 197 if (by1 >= bins) by1 = bins - 1; |
198 | 198 |
199 for (int bin = by0; bin < by1; ++bin) { | 199 for (int bin = by0; bin <= by1; ++bin) { |
200 | 200 |
201 float value = in[bin]; | 201 float value = in[bin]; |
202 | 202 |
203 if (bin == by0 || value > out[y]) { | 203 if (bin == by0 || value > out[y]) { |
204 out[y] = value; | 204 out[y] = value; |