|Subject:||seems overly complicated with all those conditionals.|
|Summary:||Package rating comment|
Stephen Young rated this package as follows:
||1. seems overly complicated with all those conditionals.
|seems overly complicated with all those conditionals.|
This should work fine for all cases:
$expected_result = 1 / (1 + pow(10, (($score - $opponent_score) / 400)));
$new_score = $score + 10 * (($win_lose_or_draw) - $expected_result);