glaivepro/iaafpoints
最新稳定版本:1.2.2
Composer 安装命令:
composer require glaivepro/iaafpoints
包简介
PHP library to calculate World Athletics (IAAF) scoring points of athletics and World Athletics (IAAF) scoring points for combined events.
README 文档
README
PHP library to calculate World Athletics (IAAF) scoring points of athletics and WA (IAAF) scoring points for combined events. And some other evaluations of track and field results.
IAAF is rolling a rebrand to WA, but we currently have no plans to rename the package or any of classes.
The WA scoring tables that we reproduce are these ones: https://www.worldathletics.org/about-iaaf/documents/technical-information#collapsescoring-tables
This package is used for the stats system of Latvian Athletics Association.
Table of Contents
Installation
Use composer:
composer require glaivepro/iaafpoints
Usage
This package provides mutliple calculators that all provide the same interface.
// Calculator and use-case specific options. $options = [ 'gender' => 'm', 'venueType' => 'outdoor', 'discipline' => '200m', ]; // Create a calculator instance $calculator = new \GlaivePro\IaafPoints\IaafCalculator($options); // Evaluate a result getting some points or a class assigned to result. $points = $calculator->evaluate(21.61); // 980 // Update options $calculator->setOptions(['gender' => 'f']); $points = $calculator->evaluate(21.61); // 1279
See docs for more details.
Contributing
Important
Do not edit anything in data/, edit it in resources/. The files in data/
are auto-generated from files in resources/.
More here.
Changelog
It's here.
License
This package is licensed under the MIT license.
统计信息
- 总下载量: 267
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-02