diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..e41741f --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @pmmp/server-developers diff --git a/.github/dependabot.yml b/.github/dependabot.yml index dd7fbed..e009cfc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,10 @@ updates: interval: monthly time: "10:00" open-pull-requests-limit: 10 +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly + groups: + github-actions: + patterns: ["*"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e4fc81..2972dbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,15 +11,15 @@ jobs: php: ['8.2', '8.3'] name: PHP ${{ matrix.php }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP - uses: shivammathur/setup-php@2.29.0 + uses: shivammathur/setup-php@2.31.1 with: php-version: ${{ matrix.php }} - name: Cache Composer packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: "~/.cache/composer" key: "php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}-v2" diff --git a/src/Vector3.php b/src/Vector3.php index 82ade68..2f9c238 100644 --- a/src/Vector3.php +++ b/src/Vector3.php @@ -217,9 +217,9 @@ public function distance(Vector3 $pos) : float{ public function distanceSquared(Vector3 $pos) : float{ $dx = $this->x - $pos->x; - $dy = $this->y - $pos->y; - $dz = $this->z - $pos->z; - return ($dx * $dx) + ($dy * $dy) + ($dz * $dz); + $dy = $this->y - $pos->y; + $dz = $this->z - $pos->z; + return ($dx * $dx) + ($dy * $dy) + ($dz * $dz); } public function maxPlainDistance(Vector3|Vector2|float $x, float $z = 0) : float{