glaivepro/iaafpoints

PHP 库,用于计算田径和全能运动的世界田径(IAAF)得分点。

1.2.1 2024-03-19 19:17 UTC

README

PHP 库,用于计算田径的世界田径(IAAF)得分点和全能运动(IAAF)得分点。还包括一些对田径成绩的其他评估。

IAAF 正在推行品牌重塑为 WA,但我们目前没有计划重命名包或任何类。

我们复制的 WA 得分表是这些: https://www.worldathletics.org/about-iaaf/documents/technical-information#collapsescoring-tables

此包用于拉脱维亚田径协会的统计系统。

目录

安装

使用 composer

composer require glaivepro/iaafpoints

使用

此包提供多个计算器,它们都提供相同的接口。

// 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

更多详情请参见 文档

贡献

重要

不要编辑 data/ 中的任何内容,编辑 resources/ 中的内容。 data/ 中的文件是从 resources/ 中的文件自动生成的。

更多信息请见 这里

变更日志

变更日志请见 这里

许可

此包采用 MIT 许可证