Skip to content

Commit 7653a0a

Browse files
committed
Vector3: remove useless function
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.
1 parent 397db4e commit 7653a0a

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/Vector3.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,6 @@ public function distanceSquared(Vector3 $pos) : float{
222222
return ($dx * $dx) + ($dy * $dy) + ($dz * $dz);
223223
}
224224

225-
public function maxPlainDistance(Vector3|Vector2|float $x, float $z = 0) : float{
226-
if($x instanceof Vector3){
227-
return $this->maxPlainDistance($x->x, $x->z);
228-
}elseif($x instanceof Vector2){
229-
return $this->maxPlainDistance($x->x, $x->y);
230-
}else{
231-
return max(abs($this->x - $x), abs($this->z - $z));
232-
}
233-
}
234-
235225
public function length() : float{
236226
return sqrt($this->lengthSquared());
237227
}

0 commit comments

Comments
 (0)