Skip to content

ldebrouwer/distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distance

Tests Latest Stable Version Total Downloads Latest Unstable Version License

Distance helps you calculate the distance between GPS coordinates, in vanilla PHP. Pure and simple.

Installation

Using Composer

When using Composer you can always load in the latest version.

{
    "require": {
        "ldebrouwer/distance": "^1.0"
    }
}

Check it out on Packagist.

Usage

$distance = new Distance()
    ->setFormula(Formula::HAVERSINE)
    ->setUnit(Unit::KILOMETRES)
    ->between(37.331741, -122.030333, 37.422546, -122.084250);

Still to come

  • Expanded unit support.
  • Documentation.

About

Distance helps you calculate the distance between GPS coordinates, in vanilla PHP. Pure and simple.

Resources

License

Stars

Watchers

Forks

Contributors

Languages