Пример #1
0
        public static Point Midpoint(this IEnumerable <Point> points)
        {
            if (!points.Any())
            {
                return(new Point());
            }
            Point sum = new Point();

            foreach (var point in points)
            {
                sum = sum.Plus(point);
            }
            return(sum.Scale(1.0 / points.Count()));
        }
Пример #2
0
 public override void MoveToCore(Point newPosition)
 {
     base.MoveToCore(newPosition.Plus(0.2));
 }