From 8b7e00cab9bed95f384732879d33dd78f6ade54d Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 18 Jan 2019 02:17:38 +0100 Subject: Fixing players_coefficient floating value in API --- api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.php b/api.php index e164bbd..27248ba 100644 --- a/api.php +++ b/api.php @@ -113,7 +113,7 @@ function parse_parameters($parameters) { array(0, 0, 0, 0, 70, 100, 200, 300) ); $return['min_points'] = (isset($parameters['manual']) && isset($parameters['manual']['min_points'])) ? intval($parameters['manual']['min_points']) : $min_points[intval($parameters['over39_boards'])][intval($parameters['tournament_rank'])]; - $return['players_coefficient'] = (isset($parameters['manual']) && isset($parameters['manual']['players_coefficient'])) ? intval($parameters['manual']['players_coefficient']) : 0.05; + $return['players_coefficient'] = (isset($parameters['manual']) && isset($parameters['manual']['players_coefficient'])) ? floatval($parameters['manual']['players_coefficient']) : 0.05; $return['points_cutoffs'] = (isset($parameters['manual']) && isset($parameters['manual']['points_cutoffs']) && is_array($parameters['manual']['points_cutoffs'])) ? $parameters['manual']['points_cutoffs'] : array( array(0.0, 1.0), array(0.02, 0.9), -- cgit v1.2.3