DTux
/
dtux__avion-poeme
Archived
1
0
Fork 0

comparison of lat and long made on 3 decimals only

This commit is contained in:
Daniel Tartavel 2021-10-30 12:43:54 +02:00
parent 952121b1d2
commit 8f7e94e482
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class db
function newPlane() //return 0 on error
{
global $base_url;
if ($this->startLat==$this->destLat && $this->startLon==$this->destLon)
if (round($this->startLat,3,PHP_ROUND_HALF_DOWN)==round($this->destLat,3,PHP_ROUND_HALF_DOWN) && round($this->startLon,3,PHP_ROUND_HALF_DOWN)==round($this->destLon,3,PHP_ROUND_HALF_DOWN))
{
$this->destLon+=0.001;
$this->destLat+=0.001;