Skip to content

Commit 708d542

Browse files
committed
Vector3: populate missing type information
1 parent d439aaa commit 708d542

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Vector3.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,23 @@ public function __construct($x = 0, $y = 0, $z = 0){
6464
$this->z = $z;
6565
}
6666

67+
/**
68+
* @return float|int
69+
*/
6770
public function getX(){
6871
return $this->x;
6972
}
7073

74+
/**
75+
* @return float|int
76+
*/
7177
public function getY(){
7278
return $this->y;
7379
}
7480

81+
/**
82+
* @return float|int
83+
*/
7584
public function getZ(){
7685
return $this->z;
7786
}
@@ -256,6 +265,10 @@ public function distanceSquared(Vector3 $pos) : float{
256265
return (($this->x - $pos->x) ** 2) + (($this->y - $pos->y) ** 2) + (($this->z - $pos->z) ** 2);
257266
}
258267

268+
/**
269+
* @param Vector3|Vector2|float $x
270+
* @param float $z
271+
*/
259272
public function maxPlainDistance($x, $z = 0) : float{
260273
if($x instanceof Vector3){
261274
return $this->maxPlainDistance($x->x, $x->z);

0 commit comments

Comments
 (0)