title: Add radius to Longitude and Latitude with C#
body: <p>I need to generate a bounding box of min and max latitude and longitude values so I can return addresses within a given radius.</p>
  
  <p>I have two func&lt;>'s below to return the range I need to +/- to the lon lat coordinates to establish the bounding box. However I don't think the math is 100%</p>
  
  <p>I am using the Haversine formula to generate my distance calculations and that seems to be working accurately. I investigated the Vincenty formula for distance as well but for my needs that was overkill. </p>
  
  <p>My problem is that I would like my search results to be as accurate as Haversine in that the range I +/- to the lon lat coordinates takes into account the ellipsoidal curvature or the earth.</p>
  
  <p>Ok, here are my func&lt;>'s...please note I am not a Math professor :o)</p>
  
  <pre><code>static Func&lt;double, int, double&gt; GetLatitudeRange = (latitude, distance) =&gt; (180.0 / Math.PI) * (distance / EARTH_RADIUS_IN_KM);
  
  
  static Func&lt;double, double, int, double&gt; GetLongitudeRange = (longitude, latitude, distance) =&gt;
              (
                  Math.Asin(
                      Math.Sin(distance / EARTH_RADIUS_IN_KM) / Math.Cos(latitude)
                      )
              );
  </code></pre>