hichxm/mather

Mathematical packet 100% PHP

Maintainers

Details

github.com/hichxm/mather

Source

Issues

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/hichxm/mather

1.1.1 2018-10-07 14:23 UTC

This package is auto-updated.

Last update: 2025-10-18 09:24:58 UTC


README

Mather is a library that will allow you to facilitate your mathematical operations in PHP, without using an external library.

Example

Simple operations:

use Hichxm\Mather\Mather;

Mather::sum(10, 15); // return int(25)
Mather::sum(5, 0.5); // return float(5.5)

Mather::total(10, 15); // return int(25)
Mather::total(5, 0.5); // return float(5.5)

Mather::sub(10, 15); // return int(-5)
Mather::sub(0, 0.5); // return float(-0.5)

Mather::subtract(10, 15); // return int(-5)
Mather::subtract(0, 0.5); // return float(-0.5)

Lot of constant:

use Hichxm\Mather\Mather;

Mather::PI(); // 3.14...
Mather::PLANCK(); // 6.62607004 x 10^-34
Mather::LIGHT_SPEED(); // 299792458
Mather::MEISSEL_MERTENS(); // 0.26149...

...

Read documentation