bkmorse / sportstats
Stat calculation for various sports
dev-master / 1.1.x-dev
2015-02-15 17:48 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2024-10-26 17:08:18 UTC
README
#Sport Stats Stat calculations for various sports ####Install Require in composer.json:
"bkmorse/sportstats": "1.1.*@dev"
Run composer update
####Example
require_once __DIR__ . '/vendor/autoload.php';
$baseball = \bkmorse\sportstats\Factory::create('\bkmorse\sportstats\Baseball');
print $baseball->battingAverage(50, 100); // batting average
print $baseball->sluggingPercentage(20, 32); // slugging percentage