Exemplo n.º 1
0
        public List <sPoint> DeepCopy(List <sPoint> points)
        {
            if (points == null)
            {
                throw new NullReferenceException();
            }
            List <sPoint> copedList = new List <sPoint>();

            foreach (sPoint point in points)
            {
                sPoint newPoint = new sPoint(point.x, point.y);
                copedList.Add(newPoint);
            }
            return(copedList);
        }
Exemplo n.º 2
0
 public double CalculateDistanceBetweenTwoPoints(sPoint point1, sPoint point2)
 {
     return(Math.Sqrt(Math.Pow(Math.Abs(point1.x - point2.x), 2) + Math.Pow(Math.Abs(point1.y - point2.y), 2)));
 }