mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Vector2: Fixed ceil() and floor() totally broken logic
"So if I Vector2->ceil()->ceil() my vector2 magically gets incrementing values..." @Sandertv 2018
This commit is contained in:
parent
a0a2ea01bc
commit
50f273c041
@ -65,11 +65,11 @@ class Vector2{
|
||||
}
|
||||
|
||||
public function ceil(){
|
||||
return new Vector2((int) ($this->x + 1), (int) ($this->y + 1));
|
||||
return new Vector2((int) ceil($this->x), (int) ceil($this->y));
|
||||
}
|
||||
|
||||
public function floor(){
|
||||
return new Vector2((int) $this->x, (int) $this->y);
|
||||
return new Vector2((int) floor($this->x), (int) floor($this->y));
|
||||
}
|
||||
|
||||
public function round(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user