Пример #1
0
        public static double test3distanceStructDouble(PointStructD pointOne, PointStructD pointTwo)
        {
            double x = pointOne.X - pointTwo.X;
            double y = pointOne.Y - pointTwo.Y;

            return(Math.Sqrt((x * x) + (y * y)));
        }
Пример #2
0
 public void Test1()
 {
     for (int i = 0; i < NumOfSteps; i++)
     {
         PointStructD p1 = GetPoint();
         PointStructD p2 = GetPoint();
         test1distanceClasse(new PointClass((float)p1.X, (float)p1.Y),
                             new PointClass((float)p2.X, (float)p2.Y));
     }
 }
Пример #3
0
        public PointStructD GetPoint()
        {
            PointStructD p = new PointStructD
            {
                X = PFArr[MainIndex],
                Y = PFArr[PFArr.Length - MainIndex - 1]
            };

            MainIndex++;
            MainIndex &= (ArrSize - 1);
            return(p);
        }
Пример #4
0
 public void Test4()
 {
     for (int i = 0; i < NumOfSteps; i++)
     {
         PointStructD p1 = GetPoint();
         PointStructD p2 = GetPoint();
         test4distanceShort(new PointStructF {
             X = (float)p1.X, Y = (float)p1.Y
         },
                            new PointStructF {
             X = (float)p2.X, Y = (float)p2.Y
         });
     }
 }
Пример #5
0
 public void Test3()
 {
     for (int i = 0; i < NumOfSteps; i++)
     {
         PointStructD p1 = GetPoint();
         PointStructD p2 = GetPoint();
         test3distanceStructDouble(new PointStructD {
             X = p1.X, Y = p1.Y
         },
                                   new PointStructD {
             X = p2.X, Y = p2.Y
         });
     }
 }