small tweaks

This commit is contained in:
GameHerobrine 2024-01-01 08:38:39 +03:00
parent 68b8232f07
commit 6594e7d0ef
4 changed files with 31 additions and 38 deletions

View file

@ -135,7 +135,7 @@ class Vector3{
if(($x instanceof Vector3) === true){
return $this->distanceSquared($x->x, $x->y, $x->z);
}else{
return pow($this->x - $x, 2) + pow($this->y - $y, 2) + pow($this->z - $z, 2);
return ($this->x - $x)*($this->x - $x) + ($this->y - $y)*($this->y - $y) + ($this->z - $z)*($this->z - $z);
}
}