kyos/find-closest-value

Finds the closest arithmetic match in an array, using Binary Search

1.0.1 2021-08-18 14:59 UTC

This package is auto-updated.

Last update: 2024-11-28 14:36:59 UTC


README

banner

FindClosestValue

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.