phpgeo
phpgeo copied to clipboard
Point directions
This library provides a class to calculate relative directions between two points (cardinal direction). I don't know about the history of this feature but from a user point of view, it would be handy if this was an integrated method of a point (formerly coordinate):
$point1->isNorthOf($point2); // returns true/false
$point1->directionOf($point2); // returns 'north|south|west|east'