<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/distance</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Mon, 20 May 2013 12:08:14 GMT</pubDate>
<item>
<title>(PHP) Miles to Latitude and Miles to Longitude Converter - VisionHive</title>
<link>http://snipplr.com/view/67019/miles-to-latitude-and-miles-to-longitude-converter/</link>
<description><![CDATA[ <p>There are tons of functions out there to calculate the distance between two points, but what if you know one point and want to calculate the latitude ("vertical") or longitude ("horizontal") equivalent of a fixed distance, in miles? An example application would be in generating a minimum &amp; maximum latitude and longitude bounding box around an area to limit the results of a database query that uses distance from a fixed point.</p> ]]></description>
<pubDate>Sat, 01 Sep 2012 13:08:26 GMT</pubDate>
<guid>http://snipplr.com/view/67019/miles-to-latitude-and-miles-to-longitude-converter/</guid>
</item>
<item>
<title>(JavaScript) Check if coordinates are adjacent - hellowouter</title>
<link>http://snipplr.com/view/64354/check-if-coordinates-are-adjacent/</link>
<description><![CDATA[ <p>This function returns true if the two sets of coordinates are neighbors and false if they ar not. The function easily determines whether they are neighbors by looking at the distance between the positions along both axes, also callled the Manhattan distance. The sum of the two distances must be exactly 1 if the positions are adjacent.

Note: the coordinates should be integers</p> ]]></description>
<pubDate>Wed, 04 Apr 2012 19:25:53 GMT</pubDate>
<guid>http://snipplr.com/view/64354/check-if-coordinates-are-adjacent/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Get Point Using Polar Co-ordinates - adrianparr</title>
<link>http://snipplr.com/view/60222/as3-get-point-using-polar-coordinates/</link>
<description><![CDATA[ <p>This function returns a point object based upon the position, angle and distance of a starting point (polar co-ordinates).</p> ]]></description>
<pubDate>Thu, 27 Oct 2011 01:10:07 GMT</pubDate>
<guid>http://snipplr.com/view/60222/as3-get-point-using-polar-coordinates/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Getting the Distance Between Two Geographical Points - adrianparr</title>
<link>http://snipplr.com/view/58443/as3-getting-the-distance-between-two-geographical-points/</link>
<description><![CDATA[ <p>Full credit for this goes to Terrence Ryan who converted the JavaScript version to ActionScript.</p> ]]></description>
<pubDate>Mon, 05 Sep 2011 05:31:37 GMT</pubDate>
<guid>http://snipplr.com/view/58443/as3-getting-the-distance-between-two-geographical-points/</guid>
</item>
<item>
<title>(Objective C) How to find the distance between two CG points? - espinallab</title>
<link>http://snipplr.com/view/54359/how-to-find-the-distance-between-two-cg-points/</link>
<description><![CDATA[ <p>Distance between p1 and p2:

CGFloat xDist = (p2.x - p1.x);
CGFloat yDist = (p2.y - p1.y);
CGFloat distance = sqrt((xDist * xDist) + (yDist * yDist));

Background: Pythagorean theorem

Edit: if you only need to calculate if the distance between the points increases or decreases, you can omit the sqrt() which will make it a little faster.</p> ]]></description>
<pubDate>Wed, 25 May 2011 08:18:31 GMT</pubDate>
<guid>http://snipplr.com/view/54359/how-to-find-the-distance-between-two-cg-points/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Trails - onemanstudio</title>
<link>http://snipplr.com/view/53738/as3-trails/</link>
<description><![CDATA[ <p>AS3 Trails, just call checkDistance() during Your Tween</p> ]]></description>
<pubDate>Wed, 18 May 2011 17:34:03 GMT</pubDate>
<guid>http://snipplr.com/view/53738/as3-trails/</guid>
</item>
<item>
<title>(PHP) Calculate distances - ichnoweb</title>
<link>http://snipplr.com/view/51629/calculate-distances/</link>
<description><![CDATA[ <p>"Here is a very handy function, which calculate the distance from a point A to a point B, using latitudes and longitudes. The function can return the distance in miles, kilometers, or nautical miles."</p> ]]></description>
<pubDate>Wed, 06 Apr 2011 07:11:51 GMT</pubDate>
<guid>http://snipplr.com/view/51629/calculate-distances/</guid>
</item>
<item>
<title>(PHP) Get distance between 2 points - marzsman</title>
<link>http://snipplr.com/view/51533/get-distance-between-2-points/</link>
<description><![CDATA[ <p>Get the distance between 2 points on a map</p> ]]></description>
<pubDate>Mon, 04 Apr 2011 23:23:26 GMT</pubDate>
<guid>http://snipplr.com/view/51533/get-distance-between-2-points/</guid>
</item>
<item>
<title>(Python) Euclidean Distance - adkatrit</title>
<link>http://snipplr.com/view/48799/euclidean-distance/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 11 Feb 2011 04:05:09 GMT</pubDate>
<guid>http://snipplr.com/view/48799/euclidean-distance/</guid>
</item>
<item>
<title>(JavaScript) Distance Between Two Points - parkerkrhoyt</title>
<link>http://snipplr.com/view/47207/distance-between-two-points/</link>
<description><![CDATA[ <p>This function will calculate the distance between two provided points.  This is useful in game development when calculating paths of motion for sprites.  The function expects two points to be provided.  A point is defined as an object with an "x" and a "y" property.  The result is a numeric value of the distance.</p> ]]></description>
<pubDate>Sun, 16 Jan 2011 04:24:08 GMT</pubDate>
<guid>http://snipplr.com/view/47207/distance-between-two-points/</guid>
</item>
<item>
<title>(ActionScript) Get vector distance - ricosushi</title>
<link>http://snipplr.com/view/37261/get-vector-distance/</link>
<description><![CDATA[ <p>Returns the distance from 2 points.</p> ]]></description>
<pubDate>Wed, 14 Jul 2010 07:30:43 GMT</pubDate>
<guid>http://snipplr.com/view/37261/get-vector-distance/</guid>
</item>
<item>
<title>(Objective C) Get the distance from the user's location to the venue - espinallab</title>
<link>http://snipplr.com/view/27707/get-the-distance-from-the-users-location-to-the-venue/</link>
<description><![CDATA[ <p>This is the code i wrote for clubplanet to get the distance from the user's location to the venues.</p> ]]></description>
<pubDate>Thu, 04 Feb 2010 16:51:20 GMT</pubDate>
<guid>http://snipplr.com/view/27707/get-the-distance-from-the-users-location-to-the-venue/</guid>
</item>
<item>
<title>(Other) OpenGL Distance to object - antonmills</title>
<link>http://snipplr.com/view/27077/opengl-distance-to-object/</link>
<description><![CDATA[ <p>Works out the distance between two objects in 3D space, you'll need the Vertex3D struct also in my snipppets</p> ]]></description>
<pubDate>Tue, 26 Jan 2010 05:00:15 GMT</pubDate>
<guid>http://snipplr.com/view/27077/opengl-distance-to-object/</guid>
</item>
<item>
<title>(JavaScript) Calculate distance between two points with latitude and longitude coordinates - ginoplusio</title>
<link>http://snipplr.com/view/25479/calculate-distance-between-two-points-with-latitude-and-longitude-coordinates/</link>
<description><![CDATA[ <p>This function calculates distance with the Haversine formula, this formula assumes that our Earth is spherical, but it isn’t since it’s more like a big orange fruit also compresses at poles. I’ve read that this function has an error about + o – 3 meters (it depends), but it’s a small error for many purposes.</p> ]]></description>
<pubDate>Sat, 26 Dec 2009 17:57:14 GMT</pubDate>
<guid>http://snipplr.com/view/25479/calculate-distance-between-two-points-with-latitude-and-longitude-coordinates/</guid>
</item>
<item>
<title>(JavaScript) Calculate distance on Google Map v3 with a ruler - ginoplusio</title>
<link>http://snipplr.com/view/25079/calculate-distance-on-google-map-v3-with-a-ruler/</link>
<description><![CDATA[ <p>I’ve made a ruler to measure distances on a Google Map V3. The file Ruler.js contains a two function: one to calculate the distance between two points on the map with their position expressed in decimal degrees, and one function that add the ruler. Ther “ruler” is composed with two markers, a poly and two labels which show the distance. Look the link for a working demo.</p> ]]></description>
<pubDate>Sat, 19 Dec 2009 14:03:48 GMT</pubDate>
<guid>http://snipplr.com/view/25079/calculate-distance-on-google-map-v3-with-a-ruler/</guid>
</item>
<item>
<title>(SQL) Calculating distance in Kilometres and Miles from Latitude and Longitude - zingo</title>
<link>http://snipplr.com/view/24082/calculating-distance-in-kilometres-and-miles-from-latitude-and-longitude/</link>
<description><![CDATA[ <p>Using SQL you can have your database return the distance between 2 sets of Lat and Long points, and using some math functions also take into account the curvature of the earth.</p> ]]></description>
<pubDate>Tue, 01 Dec 2009 20:22:06 GMT</pubDate>
<guid>http://snipplr.com/view/24082/calculating-distance-in-kilometres-and-miles-from-latitude-and-longitude/</guid>
</item>
<item>
<title>(C++) Mex Function for Mahalanobis Function - benjamin</title>
<link>http://snipplr.com/view/22115/mex-function-for-mahalanobis-function/</link>
<description><![CDATA[ <p>This code is a demonstration of writing mex functions using the armadillo scientific library. Please see my blog post for more details and leave comments there.</p> ]]></description>
<pubDate>Thu, 29 Oct 2009 16:20:43 GMT</pubDate>
<guid>http://snipplr.com/view/22115/mex-function-for-mahalanobis-function/</guid>
</item>
<item>
<title>(PHP) Coordinate - Distance Lookup - seengee</title>
<link>http://snipplr.com/view/18389/coordinate--distance-lookup/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 17 Aug 2009 07:10:57 GMT</pubDate>
<guid>http://snipplr.com/view/18389/coordinate--distance-lookup/</guid>
</item>
<item>
<title>(ActionScript 3) Papervision3D - distanceTo() - allnatural</title>
<link>http://snipplr.com/view/13581/papervision3d--distanceto/</link>
<description><![CDATA[ <p>Check the distance between two objects in 3D space</p> ]]></description>
<pubDate>Mon, 30 Mar 2009 12:48:51 GMT</pubDate>
<guid>http://snipplr.com/view/13581/papervision3d--distanceto/</guid>
</item>
<item>
<title>(PHP) Distance between two points - ginoplusio</title>
<link>http://snipplr.com/view/9566/distance-between-two-points/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 08 Nov 2008 07:05:12 GMT</pubDate>
<guid>http://snipplr.com/view/9566/distance-between-two-points/</guid>
</item>
</channel>
</rss>