Skip to content

Commit

Permalink
Vector3: remove useless function
Browse files Browse the repository at this point in the history
this was added for a specialized use case.
I've never liked these kinds of overloaded signatures, and since there's no use for this function, it seemed pointless to change it.
  • Loading branch information
dktapps committed Dec 3, 2024
1 parent 397db4e commit 7653a0a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Vector3.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,6 @@ public function distanceSquared(Vector3 $pos) : float{
return ($dx * $dx) + ($dy * $dy) + ($dz * $dz);
}

public function maxPlainDistance(Vector3|Vector2|float $x, float $z = 0) : float{
if($x instanceof Vector3){
return $this->maxPlainDistance($x->x, $x->z);
}elseif($x instanceof Vector2){
return $this->maxPlainDistance($x->x, $x->y);
}else{
return max(abs($this->x - $x), abs($this->z - $z));
}
}

public function length() : float{
return sqrt($this->lengthSquared());
}
Expand Down

0 comments on commit 7653a0a

Please sign in to comment.