예제 #1
0
        // Calculate distances for algorithm
        private List <Double> getClickDistanceList(PointCollection points, Point clickPoint)
        {
            List <Double> distances = points.Aggregate(
                new List <Double>(),
                (acc, p) => {
                acc.Add(Utilities.getDistance(p, clickPoint));
                return(acc);
            });

            return(distances);
        }
예제 #2
0
        private List <Double> GetClickDistanceList(PointCollection points, Point clickPoint)
        {
            List <Double> distances = points.Aggregate(
                new List <Double>(),
                (acc, p) =>
            {
                acc.Add(CustomPolygon.GetDistance(p, clickPoint));
                return(acc);
            });

            return(distances);
        }