Bienvenue invité ( Connexion | Inscription )

Flash...Flash...Flash
Mille-Sabords survit uniquement grâce aux dons de ses membres, MERCI !!!>


 
Reply to this topicStart new topic
> About The Points Calculation
M-S_BenAssen
posté lundi 15 septembre 2003 à 09:38
Message #1


*******
Grand-frais

Groupe : Membres
Messages : 1664
Inscrit : 14/10/2002
Lieu : Assen, pays bas
Membre no 326



Hi all,

the present point calculation was made for individual ladder.

The points are computed using real values and rounded to integer values before displaying.
The rounding operation is made in PHP by converting the value in an integer:
Code
echo "        <B>".(int)($Points[$IdxPlayer]['total']+$Points[$PlayerRes[alignement]]['total'])."</B> points";


This results in a wrong display if the decimal part of the value is between .51 and .99:
i.e. 198.5925 round to 198 !!!

In the next version,
the exact value will be displayed under the rounded value. Exact value in Italic and rounded value in Bold.


Code
echo "        <B>".(int)($Points[$IdxPlayer]['total']+$Points[$PlayerRes[alignement]]['total'])."</B> points";
      echo "        (<I>".($Points[$IdxPlayer]['total']+$Points[$PlayerRes[alignement]]['total'])."</I>)";



Displaying:
198 points
(198.5925)

Therefore for the IF computations, you will be able to take the exact value.

The rounded value will be still used for individual ladder computation.


--------------------
« Si je suis descendu, je ne regretterai absolument rien. La termitière future m’épouvante. Et je hais leur vertu de robots. Moi, j’étais fait pour être jardinier. » Antoine de Saint-Exupéry
Go to the top of the page
 
+Quote Post
M-S_BenAssen
posté lundi 15 septembre 2003 à 17:26
Message #2


*******
Grand-frais

Groupe : Membres
Messages : 1664
Inscrit : 14/10/2002
Lieu : Assen, pays bas
Membre no 326



OK, it is now fixed.
In the game result, the rounded and the non rounded value is displayed.
Therefore for the inter-flotilla ladder, you may compute the exact value of the point for each side.
Cheers,
B.


--------------------
« Si je suis descendu, je ne regretterai absolument rien. La termitière future m’épouvante. Et je hais leur vertu de robots. Moi, j’étais fait pour être jardinier. » Antoine de Saint-Exupéry
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



RSS Version bas débit Nous sommes le : jeudi 18 avril 2024 à 10:17