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); }
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))); }