Guest User

Untitled

a guest
Jul 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. if($note_cal_1 <= 2100 || $note_cal_2 <= 2100)
  2. {
  3.     $K = 32;
  4. }
  5.                        
  6. if(($note_cal_1 > 2100 && $note_cal_1 <= 2400)  || ($note_cal_2 > 2100 && $note_cal_2 <= 2400))
  7. {
  8.     $K = 24;
  9. }
  10.                        
  11. if($note_cal_1 > 2400  || $note_cal_2 > 2400)
  12. {
  13.     $K = 16;
  14. }
  15.                        
  16. $F = 400;
  17. $D = $note_cal_1 - $note_cal_2;
  18. $D = $D - $D - $D;
  19.                    
  20. if($gagne == 1)
  21. {
  22.     $note_cal_1 = $note_cal_1 + ($K * (1 - (1 / (1 + pow(10, $D / $F)))));
  23.     $D = $note_cal_2 - $note_cal_1;
  24.     $D = $D - $D - $D;
  25.     $note_cal_2 = $note_cal_2 + ($K * (0 - (1 / (1 + pow(10, $D / $F)))));
  26. }
  27.                    
  28. else
  29. {
  30.     $note_cal_1 = $note_cal_1 + ($K * (0 - (1 / (1 + pow(10, $D / $F)))));
  31.     $D = $note_cal_2 - $note_cal_1;
  32.     $D = $D - $D - $D;
  33.     $note_cal_2 = $note_cal_2 + ($K * (1 - (1 / (1 + pow(10, $D / $F)))));
  34. }
  35.  
  36. if($gagne == 1)
  37. {
  38.     $nb_vote_cal_1++;
  39. }                  
  40.                    
  41. else
  42. {
  43.     $nb_vote_cal_2++;
  44. }
Add Comment
Please, Sign In to add comment