Beispiel #1
0
            public float TestPointDistanceShortStructFloat()
            {
                var pointOne = new PointStruct();
                var pointTwo = new PointStruct();

                pointOne.X = 2302323.2f;
                pointTwo.Y = 3232233.4f;
                return((pointOne.X * pointOne.X) + (pointOne.Y * pointOne.Y));
            }
Beispiel #2
0
            public double TestPointDistanceStructDouble()
            {
                var pointOne = new PointStruct();
                var pointTwo = new PointStruct();

                pointOne.DX = 2302323.232;
                pointTwo.DY = 3232233.423;
                return(Math.Sqrt((pointOne.DX * pointOne.DX) + (pointOne.DY * pointOne.DY)));
            }
Beispiel #3
0
            public void TestArrayAddSpeedStructFloat()
            {
                var point = new PointStruct()
                {
                    X = 42.4f, Y = 22.3f
                };
                var array = new PointStruct[15];

                for (int i = 0; i < array.Length; i++)
                {
                    array[i] = point;
                }
            }