mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Vector2: Fixed getFloorX() and getFloorY() logical flaws
(int) typecast does not round down, it truncates!!!!!!!! :yodaangry:
This commit is contained in:
parent
3962d32ffe
commit
4e9e285e37
@ -41,11 +41,11 @@ class Vector2{
|
||||
}
|
||||
|
||||
public function getFloorX(){
|
||||
return (int) $this->x;
|
||||
return (int) floor($this->x);
|
||||
}
|
||||
|
||||
public function getFloorY(){
|
||||
return (int) $this->y;
|
||||
return (int) floor($this->y);
|
||||
}
|
||||
|
||||
public function add($x, $y = 0){
|
||||
|
Loading…
x
Reference in New Issue
Block a user