@@ -218,8 +218,8 @@ |
||
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | //Because this is a 2D grid, we can use simple Pythagoras |
| 221 | - $distanceX = $to->getX()-$this->getX(); |
|
| 222 | - $distanceY = $to->getY()-$this->getY(); |
|
| 221 | + $distanceX = $to->getX() - $this->getX(); |
|
| 222 | + $distanceY = $to->getY() - $this->getY(); |
|
| 223 | 223 | |
| 224 | 224 | return pow(pow($distanceX, 2) + pow($distanceY, 2), 0.5); |
| 225 | 225 | |