See code on this link:

http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21494399.html?query=point++with+double&topics=327
Lat longs need doubles.... can i use this code with doubles? It seems point needs int as arguments.

Thanks

Richard

copy of the code:

// Define our two points

Point p1 = new Point(73, 40); // 73 degrees west 40 degrees north (New York City)

Point p2 = new Point(-6, 50); // 6 degrees east and 50 degrees north (Cologne)

double DegToRadFactor = (Math.PI / 180);

double RadiusOfTheEarth = 3959; /// Radius of the earth in miles (can also be 6371 kilometers)

/// Math.Cos just use radiants, instead of degrees, so calculate the rad's

double p1X = p1.X * DegToRadFactor;

double p1Y = p1.Y * DegToRadFactor;

double p2X = p2.X * DegToRadFactor;

double p2Y = p2.Y * DegToRadFactor;

double der = Math.Cos(p1Y) * Math.Cos(p2Y) * Math.Cos(p2X - p1X) + Math.Sin(p1Y) * Math.Sin(p2Y);

/// Calculate Distance

double distance = Math.Acos(der) * RadiusOfTheEarth;