Пример #1
0
        private int computeLength(CartesianPoints cartesianPoints)
        {
            //variables
            float length;

            length = (float)Math.Sqrt(((x_point2 - x_point1) * (x_point2 - x_point1)) + ((y_point2 - y_point1) * (y_point2 - y_point1)));
            Console.WriteLine("The Distance between two points are:" + length);
        }
Пример #2
0
        public void addCartesianPoints(int x_point1, int x_point2, int y_point1, int y_point2)
        {
            CartesianPoints cartesianPoints = new CartesianPoints(x_point1, x_point2, y_point1, y_point2);

            // this.length = 0;
            this.CartesianPointsList.AddLast(cartesianPoints);
            //this.PointsMap.Add(length, cartesianPoints);
        }