<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class LBSUtil { public static function distance($QaRYD, $oI0Nb, $umy3x, $vquoR) { goto jP8_P; YSNeD: $NKVxh = pow(sin($UPk29 / 2), 2) + cos($oTl67) * cos($A3ord) * pow(sin($nmo7q / 2), 2); goto UUUoM; YlCIh: $UPk29 = abs($oTl67 - $A3ord); goto Eq2QD; Eq2QD: $nmo7q = abs($UUCB8 - $cb7F3); goto YSNeD; ADJFz: $A3ord = deg2rad($vquoR); goto YlCIh; jP8_P: $KtZ7J = 6378137; goto AlDnu; AlDnu: $UUCB8 = deg2rad($QaRYD); goto Pg_VS; UUUoM: return intval($KtZ7J * 2 * asin(sqrt($NKVxh)) + 0.5); goto PWaHO; WCpGD: $oTl67 = deg2rad($oI0Nb); goto ADJFz; Pg_VS: $cb7F3 = deg2rad($umy3x); goto WCpGD; PWaHO: } public static function formatDistance($dIq3X) { if ($dIq3X > 1000) { return round($dIq3X / 1000.0, 1) . 'KM'; } else { return intval($dIq3X) . 'M'; } } public static function locationByIP($aQyrc, $F28aA = null) { return null; } }