public static double PointDistanceDouble(PointStruct pointOne, PointStruct pointTwo) { double x = pointOne.X - pointTwo.X; double y = pointOne.Y - pointTwo.Y; return(Math.Sqrt((x * x) + (y * y))); }
public static float PointDistanceShort(PointStruct pointOne, PointStruct pointTwo) { float x = pointOne.X - pointTwo.X; float y = pointOne.Y - pointTwo.Y; return((x * x) + (y * y)); }
public static PointStruct giveMeThat() { var rnd = new Random(); double xD = rnd.NextDouble(); double yD = rnd.NextDouble(); PointStruct point = new PointStruct() { X = (float)xD, Y = (float)yD }; return(point); }