From d6e343c2cf076a8bce946374f3d5682d5f98cb58 Mon Sep 17 00:00:00 2001 From: SOF3 Date: Wed, 24 Aug 2016 17:15:22 +0800 Subject: [PATCH] Premature optimization again --- src/pocketmine/math/Vector3.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/math/Vector3.php b/src/pocketmine/math/Vector3.php index 32a92ebda..c8c9463c5 100644 --- a/src/pocketmine/math/Vector3.php +++ b/src/pocketmine/math/Vector3.php @@ -253,7 +253,7 @@ class Vector3{ if($f < 0 or $f > 1){ return null; }else{ - return new Vector3($this->x + $xDiff * $f, $this->y + $yDiff * $f, $this->z + $zDiff * $f); + return new Vector3($x, $this->y + $yDiff * $f, $this->z + $zDiff * $f); } } @@ -280,7 +280,7 @@ class Vector3{ if($f < 0 or $f > 1){ return null; }else{ - return new Vector3($this->x + $xDiff * $f, $this->y + $yDiff * $f, $this->z + $zDiff * $f); + return new Vector3($this->x + $xDiff * $f, $y, $this->z + $zDiff * $f); } } @@ -307,7 +307,7 @@ class Vector3{ if($f < 0 or $f > 1){ return null; }else{ - return new Vector3($this->x + $xDiff * $f, $this->y + $yDiff * $f, $this->z + $zDiff * $f); + return new Vector3($this->x + $xDiff * $f, $this->y + $yDiff * $f, $z); } }