migrations/20170809011200_player_elo_calculations.php 1 location
|
@@ 162-165 (lines=4) @@
|
159 |
|
]; |
160 |
|
$diff *= (isset($durations[$duration])) ? $durations[$duration] : 1; |
161 |
|
|
162 |
|
if (abs($diff) < 1 && $diff != 0) { |
163 |
|
// ELOs such as 0.75 should round up to 1... |
164 |
|
return ($diff > 0) ? 1 : -1; |
165 |
|
} |
166 |
|
|
167 |
|
// ...everything else is rounded down (-3.7 becomes -3 and 48.1 becomes 48) |
168 |
|
return intval($diff); |
models/Match.php 1 location
|
@@ 1197-1200 (lines=4) @@
|
1194 |
|
$durations = Service::getParameter('bzion.league.duration'); |
1195 |
|
$diff *= (isset($durations[$duration])) ? $durations[$duration] : 1; |
1196 |
|
|
1197 |
|
if (abs($diff) < 1 && $diff != 0) { |
1198 |
|
// ELOs such as 0.75 should round up to 1... |
1199 |
|
return ($diff > 0) ? 1 : -1; |
1200 |
|
} |
1201 |
|
|
1202 |
|
// ...everything else is rounded down (-3.7 becomes -3 and 48.1 becomes 48) |
1203 |
|
return intval($diff); |