From 1c224bd6434549e56a222daaeaf6320c0fe325da Mon Sep 17 00:00:00 2001 From: kotyaralih <62548070+kotyaralih@users.noreply.github.com> Date: Mon, 13 Dec 2021 07:49:52 -0800 Subject: [PATCH] Fix Vector2 --- src/math/Vector2.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/math/Vector2.php b/src/math/Vector2.php index e5c27f47..406cd95b 100644 --- a/src/math/Vector2.php +++ b/src/math/Vector2.php @@ -47,9 +47,7 @@ class Vector2{ if(($x instanceof Vector2) === true){ return $this->add($x->x, $x->y); }else{ - $this->x += $x; - $this->y += $y; - return new Vector3($this->x + $x, $this->y + $y); + return new Vector2($this->x + $x, $this->y + $y); } }