<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class LBSUtil { public static function distance($t_9Yr, $h__gu, $j08og, $M1I01) { goto T95wj; T95wj: $xhMJ5 = 6378137; goto Wye8_; al3T_: $dH5LT = pow(sin($oIwbs / 2), 2) + cos($nxOir) * cos($CkgpL) * pow(sin($jVl2f / 2), 2); goto OM0Rd; JaciR: $nxOir = deg2rad($h__gu); goto HJfyZ; SBn4v: $jVl2f = abs($lQJ0n - $dx1wc); goto al3T_; OM0Rd: return intval($xhMJ5 * 2 * asin(sqrt($dH5LT)) + 0.5); goto t2yZK; GfcC3: $dx1wc = deg2rad($j08og); goto JaciR; Wye8_: $lQJ0n = deg2rad($t_9Yr); goto GfcC3; FJH2E: $oIwbs = abs($nxOir - $CkgpL); goto SBn4v; HJfyZ: $CkgpL = deg2rad($M1I01); goto FJH2E; t2yZK: } public static function formatDistance($JFfq2) { if ($JFfq2 > 1000) { return round($JFfq2 / 1000.0, 1) . 'KM'; } else { return intval($JFfq2) . 'M'; } } public static function locationByIP($WrX3L, $FDNZs = null) { return null; } }