提交 7080fbc1 编写于 作者: L Lazar Laszlo

Merge pull request #20 from Thulinma/finder_fix

Fixed pattern finder inaccuracies by adding rudamentary center sorter.
......@@ -415,11 +415,14 @@ function FinderPatternFinder()
}
}
if (this.possibleCenters.Count > 3)
if (this.possibleCenters.length > 3)
{
// Throw away all but those first size candidate points we found.
//Collections.insertionSort(possibleCenters, new CenterComparator());
//SupportClass.SetCapacity(possibleCenters, 3);
this.possibleCenters.sort(function(a, b){
if (a.count > b.count){return -1;}
if (a.count < b.count){return 1;}
return 0;
});
}
return new Array( this.possibleCenters[0], this.possibleCenters[1], this.possibleCenters[2]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册