yrehan32/php-haversine
最新稳定版本:1.0.0
Composer 安装命令:
composer require yrehan32/php-haversine
包简介
A package used to calculate the distance between two coordinate points using the haversine algorithm
README 文档
README
Install the library via Composer
composer require yrehan32/php-haversine
After installing the library, you can use it in your code like this:
use Yrehan32\PhpHaversine\Haversine; /* * Calculate the distance between two points * @param float $latitudeFrom Latitude of the first point * @param float $longitudeFrom Longitude of the first point * @param float $latitudeTo Latitude of the second point * @param float $longitudeTo Longitude of the second point * @param string $separators Number of digits after the comma (default: 2) * * @return float Distance between the two points */ $distance = Haversine::calculate( 52.2296756, 21.0122287, 52.406374, 16.9251681 ); echo $distance; // It will print 278.46
License
This library is licensed under the LGPL-2.1 License.
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-2.1
- 更新时间: 2022-12-27