public function get3dDistance(IPoint &$point) { $distance = sqrt(pow($point->getX() - $this->x, 2) + pow($point->getY() - $this->y, 2) + pow($point->getZ() - $this->z, 2)); return $distance; }