kde transform 当 dw(步长) 为 0 时会无限循环,出现卡死
SunShinewyf opened this issue · comments
- Link:
- Platform:
- Mini Showcase(like screenshots):
kde 中有一行:
const seriesValues = getSeriesValues(extent, options.step ? options.step : bw);
getSeriesValues 源码如下:
module.exports = (extent, bandwidth = 1) => {
const [ min, max ] = extent;
const values = [];
let tmp = min;
while (tmp < max) {
values.push(tmp);
tmp += bandwidth;
}
values.push(max);
return values;
};
当 bandwidth 是0 ,max 又很大的时候,会出现无限循环