diff options
author | emkael <emkael@tlen.pl> | 2019-01-18 02:17:38 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-01-18 02:17:38 +0100 |
commit | 8b7e00cab9bed95f384732879d33dd78f6ade54d (patch) | |
tree | 088185273d8b62a61f06dc5bb1013e1937450412 | |
parent | a035a0dbde6239bf3455d84458e302d3a6c6afac (diff) |
Fixing players_coefficient floating value in API
-rw-r--r-- | api.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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), |