PHPackages                             tmilos/cgi-calc - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tmilos/cgi-calc

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tmilos/cgi-calc
===============

0.1.0(10y ago)012MITPHPPHP &gt;=5.5.1

Since Apr 5Pushed 10y ago1 watchersCompare

[ Source](https://github.com/tmilos/cgi-calc)[ Packagist](https://packagist.org/packages/tmilos/cgi-calc)[ RSS](/packages/tmilos-cgi-calc/feed)WikiDiscussions master Synced 2mo ago

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

CGI Calc
========

[](#cgi-calc)

Casual Gaming Infrastructure - Calc PHP library.

[![License](https://camo.githubusercontent.com/0ee905dc83e985f84307610543081ca505ac2b67b73bba0c1719c28479385598/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746d696c6f732f6367692d63616c632e737667)](https://packagist.org/packages/tmilos/cgi-calc)[![Build Status](https://camo.githubusercontent.com/f36d7b83c27eb8b99482e1f5321e403c73c90da84e944bbf58140dc5bfb9157e/68747470733a2f2f7472617669732d63692e6f72672f746d696c6f732f6367692d63616c632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tmilos/cgi-calc)[![Coverage Status](https://camo.githubusercontent.com/46a8268be84da14306552813d7f712508194e700d95d559ce81befc0e03883e3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f746d696c6f732f6367692d63616c632f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/tmilos/cgi-calc?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/16272dcc39b35fee9596446ec429e5dd99fa3b44ded8878267291a1cbebe07de/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746d696c6f732f6367692d63616c632f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tmilos/cgi-calc/?branch=master)

Point
-----

[](#point)

```
$point = new Point(10, 10);
print $point->getX();
print $point->getY();
$leftPoint = $point->left();
$otherPoint = $point->move(new Point(2, 3));
```

PointSet
--------

[](#pointset)

```
$set = new PointSet([new Point(10, 10), new Point(20, 20)]);
$set[new Point(10, 10)] = 'something';
$set->contains(new Point(10, 10)); // true
print $set[new Point(10, 10)]; // something

$other = new PointSet([new Point(10, 10), new Point(0, 0)]);
$unionSet = $set->union($other);
$intersectionSet = $set->intersect($other);
$differenceSet = $set->diff($other);
```

Field Producers
---------------

[](#field-producers)

```
$rectangularProducer = new RectangularFromTwoPoints(new Point(0,0), new Point(3, 2), function (Point $point) {
    // value provider for the points of the generated rectangular
    return sprintf("%d : %d", $point->getX(), $point->getY());
});
$rect = $rectangularProducer->produce();
```

```
$rectangularProducer = new RectangularFromTwoPoints(new Point(2,3), 10, 8);
$rect = $rectangularProducer->produce();
```

```
$circleProducer = new CircularCenterRadius(new Point(10,10), 8);
$circle = $circleProducer->produce();
```

License
=======

[](#license)

Copyright [Milos Tomic](https://github.com/tmilos). This package is licensed under MIT, for details check the [LICENSE](LICENSE) file.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

3692d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e5954d541c3e6ce57f3674bd4ce58bf22629f70b8e8a8779aec754787d26e7e?d=identicon)[tmilos](/maintainers/tmilos)

---

Top Contributors

[![tmilos](https://avatars.githubusercontent.com/u/1818373?v=4)](https://github.com/tmilos "tmilos (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tmilos-cgi-calc/health.svg)

```
[![Health](https://phpackages.com/badges/tmilos-cgi-calc/health.svg)](https://phpackages.com/packages/tmilos-cgi-calc)
```

###  Alternatives

[wablas/wablas-client-php

(Unoficial) Wablas Client PHP

141.4k](/packages/wablas-wablas-client-php)

PHPackages © 2026

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