PHPackages                             hotrush/angular-sweep - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hotrush/angular-sweep

ActiveLibrary

hotrush/angular-sweep
=====================

v1.0.0(7y ago)15MITPHPPHP &gt;=7.1

Since Apr 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/hotrush/angular-sweep)[ Packagist](https://packagist.org/packages/hotrush/angular-sweep)[ RSS](/packages/hotrush-angular-sweep/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/6d694774b574da0a46e5956fa8afc262f4c5e653be79e404b150606abcd86a18/68747470733a2f2f7472617669732d63692e6f72672f686f74727573682f616e67756c61722d73776565702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/hotrush/angular-sweep)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6e14c7633b8e4d7a792e964197f1fe0bc49f30b9760c172ad29a94afd45c6b22/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f686f74727573682f616e67756c61722d73776565702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/hotrush/angular-sweep/?branch=master)[![Packagist](https://camo.githubusercontent.com/b1c432b12a622d2b0ae0f9ba69613eaafc71ca41c15fad7686c885de9e5002ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f74727573682f616e67756c61722d73776565702e7376673f6c6162656c3d5061636b6167697374)](https://packagist.org/packages/hotrush/angular-sweep)

PHP implementation of angular sweep algorithm
---------------------------------------------

[](#php-implementation-of-angular-sweep-algorithm)

Solves issue of finding maximum points that can be enclosed in a circle of given radius and getting the center of this point.

[https://en.wikipedia.org/wiki/Visibility\_polygon#Angular\_sweep](https://en.wikipedia.org/wiki/Visibility_polygon#Angular_sweep)

[https://github.com/pear/Math\_Complex/blob/master/Math/Complex.php](https://github.com/pear/Math_Complex/blob/master/Math/Complex.php)

### Installation

[](#installation)

```
composer require hotrush/angular-sweep
```

### Usage

[](#usage)

```
use Hotrush\AngularSweep\NumbersCollection;
use Hotrush\AngularSweep\ComplexNumber;
use Hotrush\AngularSweep\AngularSweep;

$coordinates = [
    [6.47634, 7.69628],
    [5.16828, 4.79915],
    [6.69533, 6.20378],
];

$collection = new NumbersCollection();

foreach ($coordinates as $coordinate) {
    $collection->add(new ComplexNumber($coordinate[0], $coordinate[1]));
}

$radius = 1;

$sweep = new AngularSweep($collection, $radius);

echo $sweep->getMax();
// 2

$center = $sweep->getMaxCenter();
echo $center->getReal() . '-' . $center->getIm();
// '6.47634-7.69628'
```

### Testing

[](#testing)

```
phpunit
```

##### FYI

[](#fyi)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2639d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cfcee390045ec2c0820506544a6778f93fed658e5e1124d38db4524aa6b3f4f?d=identicon)[hotrush](/maintainers/hotrush)

---

Top Contributors

[![hotrush](https://avatars.githubusercontent.com/u/1247004?v=4)](https://github.com/hotrush "hotrush (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hotrush-angular-sweep/health.svg)

```
[![Health](https://phpackages.com/badges/hotrush-angular-sweep/health.svg)](https://phpackages.com/packages/hotrush-angular-sweep)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
