雪地跪求用c#写的根据两点经纬度求两点距离的源代码!!!!!
我找了一个用java写的源代码,如下: 
          double   radLat1   =   rad(lat1); 
          double   radLat2   =   rad(lat2); 
          double   a   =   rad(lat1)   -   rad(lat2); 
          double   b   =   rad(lng1)   -   rad(lng2); 
          double   s   =   2   *   Math.Asin(Math.Sqrt(Math.Pow(Math.Sin(a/2),2)   +    
             Math.Cos(radLat1)*Math.Cos(radLat2)*Math.Pow(Math.Sin(b/2),2))); 
          s   =   s   *   EARTH_RADIUS; 
          s   =   Math.Round(s   *   10000)   /   10000; 
 其中,rad这个函数在c#中不识别,也不知道该引入什么包,所以~~~~~~~~
------解决方案--------------------//这样声明试试 
 private double rad(double d)  
 { 
     return d * Math.PI / 180.0; 
 }