public bool Match(List <Vector2> positions, float threshold, float minimalScore, float minSize) { if (positions.Count < samplesCount) { return(false); } if (!positions.IsLargeEnough(minSize)) { return(false); } List <Vector2> locals = GoldenSection.Pack(positions, samplesCount); float score = GoldenSection.Search(locals, points, -MathHelper.PiOver4, MathHelper.PiOver4, threshold); return(score > minimalScore); }
public void CloseAndPrepare() { points = GoldenSection.Pack(points, samplesCount); }