T201704050858

This commit is contained in:
Leander
2017-04-05 08:58:08 +02:00
parent 94c701a00f
commit 854788fd7a

View File

@@ -19,7 +19,7 @@ $chosen_answer = (($chosen_answer === '0') || ($chosen_answer && gettype(+$chose
function calculate_points($time) {
$points = $time < 2000 ? 100 : 141.1421 - 0.02842916 * $time + 0.000004132312 * pow($time, 2)
- 3.432331e-10 * pow($time, 3) + 1.391508e-14 * pow($time, 4) - 2.166078e-19 * pow($time, 5);
$points = $points < 10 ? 10 : intval($points);
$points = $points < 10 ? 100 : intval($points * 10);
return $points;
}