public float PointDistanceShortStruct(PointStruct pointOne, PointStruct pointTwo) { float x = pointOne.X - pointTwo.X; float y = pointOne.Y - pointTwo.Y; return((x * x) + (y * y)); }
public IEnumerable <object[]> DataPointStruct() { for (int i = 0; i < 100; i++) { arrayStructPointA[i] = new PointStruct { X = rnd.Next(0, 100), Y = rnd.Next(0, 100) }; arrayStructPointB[i] = new PointStruct { X = rnd.Next(0, 100), Y = rnd.Next(0, 100) }; } yield return(new object[] { arrayStructPointA, arrayStructPointB }); }