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))); }
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)); } }
public PointStructD GetPoint() { PointStructD p = new PointStructD { X = PFArr[MainIndex], Y = PFArr[PFArr.Length - MainIndex - 1] }; MainIndex++; MainIndex &= (ArrSize - 1); return(p); }
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 }); } }
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 }); } }