Vector2: Fixed getFloorX() and getFloorY() logical flaws

(int) typecast does not round down, it truncates!!!!!!!! :yodaangry:
This commit is contained in:
Dylan K. Taylor 2018-02-15 10:24:35 +00:00
parent 3962d32ffe
commit 4e9e285e37

View File

@ -41,11 +41,11 @@ class Vector2{
} }
public function getFloorX(){ public function getFloorX(){
return (int) $this->x; return (int) floor($this->x);
} }
public function getFloorY(){ public function getFloorY(){
return (int) $this->y; return (int) floor($this->y);
} }
public function add($x, $y = 0){ public function add($x, $y = 0){