Example #1
0
        public float PointDistanceStructDouble(PointStructDouble pointOne, PointStructDouble pointTwo)
        {
            float x = (float)(pointOne.X - pointTwo.X);
            float y = (float)(pointOne.Y - pointTwo.Y);

            return(MathF.Sqrt((x * x) + (y * y)));
        }
Example #2
0
        public IEnumerable <object[]> DataPointStructDouble()
        {
            for (int i = 0; i < 100; i++)
            {
                arrayStructPointDoubleA[i] = new PointStructDouble {
                    X = rnd.Next(0, 100), Y = rnd.Next(0, 100)
                };
                arrayStructPointDoubleB[i] = new PointStructDouble {
                    X = rnd.Next(0, 100), Y = rnd.Next(0, 100)
                };
            }

            yield return(new object[] { arrayStructPointDoubleA, arrayStructPointDoubleB });
        }