PHPackages                             alto/math-functions - 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. alto/math-functions

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

alto/math-functions
===================

Math functions for PHP

00PHP

Since Apr 13Pushed 1y agoCompare

[ Source](https://github.com/PhpAlto/alto-math-functions)[ Packagist](https://packagist.org/packages/alto/math-functions)[ RSS](/packages/alto-math-functions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Math Functions
==============

[](#math-functions)

Installation
------------

[](#installation)

```
composer require alto/math-functions
```

Functions
---------

[](#functions)

### `clamp`

[](#clamp)

Returns a value clamped between a minimum and maximum value.

```
clamp(float|int $value, float|int $min, float|int $max): float|int
```

### `in_range`

[](#in_range)

Returns true if a value is within a specified range.

```
in_range(float|int $value, float|int $min, float|int $max): bool
```

License
-------

[](#license)

This package is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8951d49b371d210280a58ce48969a07d1f49924810f8a1fab3a9343eb46fdc9?d=identicon)[simonandre](/maintainers/simonandre)

---

Top Contributors

[![smnandre](https://avatars.githubusercontent.com/u/1359581?v=4)](https://github.com/smnandre "smnandre (1 commits)")

### Embed Badge

![Health badge](/badges/alto-math-functions/health.svg)

```
[![Health](https://phpackages.com/badges/alto-math-functions/health.svg)](https://phpackages.com/packages/alto-math-functions)
```

###  Alternatives

[ctidigital/magento2-configurator

Keep magento persistently configured using files

174317.4k](/packages/ctidigital-magento2-configurator)[comcast/php-legal-licenses

A utility to generate a Licenses file containing the full license text for every dependency in your project for legal purposes.

821.1M9](/packages/comcast-php-legal-licenses)[xfra35/f3-cron

Job scheduling for the PHP Fat-Free Framework

73107.5k](/packages/xfra35-f3-cron)[bagusindrayana/laravel-coordinate

get nearby location from eloquent laravel

3019.7k](/packages/bagusindrayana-laravel-coordinate)

PHPackages © 2026

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