mirror of
https://github.com/sigmasternchen/promash
synced 2025-03-14 23:38:58 +00:00
10 lines
239 B
PHP
Executable file
10 lines
239 B
PHP
Executable file
<?php
|
|
function getRate($ra, $rb) {
|
|
return 1 / (1 + pow(10, ((abs($rb - $ra) > 400) ? ((($rb - $ra) > 0) ? 400 : -400) : ($rb - $ra)) / 400));
|
|
}
|
|
|
|
function getNew($win, $ra, $rate) {
|
|
$k = 10;
|
|
return $ra + $k * ($win - $rate);
|
|
}
|
|
?>
|