Snipplr
https://snipplr.com/tags/isAdjacent
Recent snippets posted on Snipplr.comen-usSat, 23 Jun 2018 16:47:41 GMT(JavaScript) Check if coordinates are adjacent - hellowouter
https://snipplr.com/view/64354/check-if-coordinates-are-adjacent/
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 ]]>Wed, 04 Apr 2012 19:25:53 GMThttps://snipplr.com/view/64354/check-if-coordinates-are-adjacent/