public void AddPoint(string[] input) { var point = new Point(input); allPointsForInstance.Add(point); _allPointConst.Add(point); NumberOfPoints++; centerOfMass = new CenterOfMass(); }
private static Point CalculateCenterOfMass(IEnumerable<Point> list) { var massCenter = new CenterOfMass(); foreach (var point in list.Where(point => point != null)) { massCenter.AddPoint(point); } return massCenter; }