Download the PHP package mugesh/calculator without Composer
On this page you can find all versions of the php package mugesh/calculator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mugesh/calculator
More information about mugesh/calculator
Files in mugesh/calculator
Download mugesh/calculator
More information about mugesh/calculator
Files in mugesh/calculator
Please rate this library. Is it a good library?
Informations about the package calculator
Mugesh Calculator
Mugesh Calculator
A simple and lightweight calculator package for PHP that provides basic arithmetic operations.
Installation
You can install this package via Composer:
Usage
Available Methods
add(float $a, float $b): float- Additionsubtract(float $a, float $b): float- Subtractionmultiply(float $a, float $b): float- Multiplicationdivide(float $a, float $b): float- Division (throws exception for division by zero)percentage(float $value, float $percentage): float- Percentage calculationpower(float $base, float $exponent): float- Power calculationsqrt(float $number): float- Square root (throws exception for negative numbers)
Testing
Run the test suite:
Or using PHPUnit directly:
Requirements
- PHP 7.4 or higher
License
This package is open-sourced software licensed under the MIT license.
All versions of calculator with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.4
The package mugesh/calculator contains the following files
Loading the files please wait ...