sujalpatel/calculator

Simple Add, Sub and Multi Functions

v1.0.0 2019-10-04 12:51 UTC

This package is auto-updated.

Last update: 2024-12-08 20:01:55 UTC


README

Latest Version on Packagist Build Status Scrutinizer Code Quality Code Intelligence Status Total Downloads

Simple Calculation Function Addition, Subtraction and Multiplication.

Installation

You can install the package via composer:

composer require sujalpatel/calculator

Usage

Add Function

use Sujalpatel\Calculator\Calculator;

public function addition()
{
    return Calculator::add(5,5); // Answer: 5 + 5 = 5
}

Sub Function

use Sujalpatel\Calculator\Calculator;

public function subtraction()
{
    return Calculator::sub(10,5); // Answer: 10 - 5 = 5
}

Multi Function

use Sujalpatel\Calculator\Calculator;

public function multiplication()
{
    return Calculator::multi(2,5); // Answer: 2 * 5 = 10
}

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email sujalpatel022@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.