mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
Added more Vector math
This commit is contained in:
@@ -97,6 +97,14 @@ class Vector3{
|
||||
return $this->add(-$x, -$y, -$z);
|
||||
}
|
||||
}
|
||||
|
||||
public function multiply($number){
|
||||
return new Vector3($this->x * $number, $this->y * $number, $this->z * $number);
|
||||
}
|
||||
|
||||
public function divide($number){
|
||||
return new Vector3($this->x / $number, $this->y / $number, $this->z / $number);
|
||||
}
|
||||
|
||||
public function ceil(){
|
||||
return new Vector3((int) ($this->x + 1), (int) ($this->y + 1), (int) ($this->z + 1));
|
||||
|
Reference in New Issue
Block a user