comparison base/ColumnOp.cpp @ 1301:6681027ff2ff 3.0-integration

Interpolate always, when interpolation requested. Previous test failed to take into account varying bin height in log-scale modes, which meant interpolation might be necessary even when more bins than pixels.
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 28 Nov 2016 14:40:45 +0000
parents 2f468f43c02c
children 47ee4706055c
comparison
equal deleted inserted replaced
1297:5cc969b236b0 1301:6681027ff2ff
99 vector<float> out(h, 0.f); 99 vector<float> out(h, 0.f);
100 int bins = int(in.size()); 100 int bins = int(in.size());
101 101
102 for (int y = 0; y < h; ++y) { 102 for (int y = 0; y < h; ++y) {
103 103
104 if (interpolate && h > bins) { 104 if (interpolate) {
105 105
106 double sy = binfory[y] - minbin - 0.5; 106 double sy = binfory[y] - minbin - 0.5;
107 double syf = floor(sy); 107 double syf = floor(sy);
108 108
109 int mainbin = int(syf); 109 int mainbin = int(syf);