Fixed bad PMFLevel::getXZ() logic

This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-25 18:54:25 +01:00
parent e7fcbe206f
commit ec5f255a71

View File

@ -124,7 +124,7 @@ class PMFLevel extends PMF{
public function getXZ($index, &$X = null, &$Z = null){
$X = $index >> $this->log;
$Z = $index & (($this->log << 1) - 1);
$Z = $index & (pow($this->log, 2) - 1);
return array($X, $Z);
}