kyos / find-closest-value
Finds the closest arithmetic match in an array, using Binary Search
Installs: 145 934
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.8
This package is auto-updated.
Last update: 2024-11-28 14:36:59 UTC
README
FindClosestValue
Finds the closest arithmetic match in an array, using Binary Search
Installation
You can install the package via composer:
composer require kyos/find-closest-value
Usage
echo (new Kyos\FindClosestValue\FindClosestValue())->findClosest([2, 5, 9], 4); // 5
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.