https://github.com/hugsbrugs/php-math
PHP Math Utilities
https://github.com/hugsbrugs/php-math
dice math modulo php
Last synced: 7 months ago
JSON representation
PHP Math Utilities
- Host: GitHub
- URL: https://github.com/hugsbrugs/php-math
- Owner: hugsbrugs
- Created: 2017-03-14T08:58:35.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-19T13:26:42.000Z (almost 7 years ago)
- Last Synced: 2025-01-20T22:35:44.326Z (about 1 year ago)
- Topics: dice, math, modulo, php
- Language: PHP
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# php-math
This librairy provides utilities function to ease math & stats
[](https://travis-ci.org/hugsbrugs/php-math)
[](https://coveralls.io/github/hugsbrugs/php-math?branch=master)
## Install
Install package with composer
```
composer require hugsbrugs/php-math
```
In your PHP code, load library
```php
require_once __DIR__ . '/../vendor/autoload.php';
use Hug\Math\Math as Math;
```
## Usage
Return modulo of a number given a divider
```php
Math::modulo($nb, $divider);
```
Compute Dice Coefficient for 2 given texts
```php
Math::dice($str1 = '', $str2 = '');
```
## Unit Tests
```
phpunit --bootstrap vendor/autoload.php test
```
## Author
Hugo Maugey [visit my website ;)](https://hugo.maugey.fr)