2017 © Pedro Peláez
 

library sumy

Simple, chainable calculation library.

image

haganjones/sumy

Simple, chainable calculation library.

  • Monday, February 6, 2017
  • by haganjones
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

Sumy

Sumy is a simple, chainable calculation library., (*1)

It started as a simple class in one of our projects but after needing and implementing the class in other projects we decided to turn it into a reusable package., (*2)

Here is a quick example:, (*3)

$sumy = new Sumy();
$sumy->add(100)->divide(2);

$sumy->get(); // 50

Installation

You can install this package by using Composer:, (*4)

composer require slashequip/sumy

Getting Started

Sumy is super simple to use, first you need to initialize an instance of Sumy in your project, you can do this a few ways:, (*5)

$sumyOne = new Sumy();
$sumyOne->get(); // 0

$sumyTwo = new Sumy(100);
$sumyTwo->get(); // 100

$sumyThree = new Sumy($sumyTwo);
$sumyThree->get() // 100

Math

$sumy = new Sumy(1000);
$sumy->add(140)->get(); // 1140
Before Function After
1000 ->add(140) 1140
1000 ->subtract(140) 860
1000 ->multiply(4.6) 4600
1000 ->divide(50) 20
961 ->sqrt() 31
24 ->pow(50) 576

Chaining

All Sumy's math methods can be chained:, (*6)

$sumy = new Sumy(100);
$sumy->add(400)->mulitply(4)->divide(2)->subtract(39)->sqrt()->pow(3);

$sumy->get(); //29791

Licence

Copyright 2021 SlashEquip OÜ., (*7)

Distributed under the MIT licence. See LICENCE.txt for further information., (*8)

The Versions

06/02 2017

dev-master

9999999-dev https://github.com/haganjones/sumy

Simple, chainable calculation library.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

math division calculation addition multiplication subtraction square root power of

06/02 2017

dev-develop

dev-develop https://github.com/haganjones/sumy

Simple, chainable calculation library.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

math division calculation addition multiplication subtraction square root power of

06/02 2017

0.2.0

0.2.0.0 https://github.com/haganjones/sumy

Simple, chainable calculation library.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

math division calculation addition multiplication subtraction square root power of

23/01 2017

0.1.1

0.1.1.0 https://github.com/haganjones/sumy

Simple, chainable calculation library.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

math division calculation addition multiplication subtraction square root power of