Skip to content

PMVirion/Calculations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Calculations

[virion] Calculator library for developers

How Use?

CalculateFactory::onRun(...);

The correct answer of all calculations is stored in the property result value contained in the operator of the class related to Calculate.

$result = CalculateFactory::onRun(
    new AddCalculate([5, 5]),      //result: 10
    new SubtractCalculate([3, 2]), //result: 1
    new DivideCalculate([5, 5]),   //result: 1
    new MultiplyCalculate([2, 5]), //result: 10
);
var_dump($result === 22); //result: true

About

[virion] Calculator library for developers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages