alto / math-functions
Math functions for PHP
dev-main
2025-04-13 02:11 UTC
Requires
- php: >=8.3
Requires (Dev)
- phpunit/phpunit: ^11.0
This package is not auto-updated.
Last update: 2025-05-12 01:07:10 UTC
README
Installation
composer require alto/math-functions
Functions
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
Returns true if a value is within a specified range.
in_range(float|int $value, float|int $min, float|int $max): bool
License
This package is licensed under the MIT License. See the LICENSE file for more information.