Skip to content

silly-meter: Calculating percentages from rewardPoints is slightly inaccurate. #13

@LittleToonCat

Description

@LittleToonCat

With the v2.6.8 game update, the rewardPoints value was introduced, but attempting to calculate the percentage of each team with them does not exactly match up with the percentages shown in-game. In fact, adding the points all together doesn't add up to the exact 5,000,000 total.

I may not know how point accumulation works within the game itself, but a couple friends of mine have suggested that the API doesn't accumulate the points from the players who has not voted for a Silly Team (if this is true at all) and in return, inaccurate percentages.

The screenshot with the in-game percentages and the percentages based on the points returned by the API, and the points value itself from the last Reward phase is provided below for reference.
image
"rewardPoints":[1015490,959080,2683028]

While I can calculate the percentages by adding all three points together...
1015490 + 959080 + 2683028 = 4657598
And use that result in place as the whole instead of 5000000, That will result in a more accurate results, but it still doesn't slightly match up with the in-game percentages.

>>> 100 * 1015490 / 4657598
21.802869204255067
>>> 100 * 959080 / 4657598
20.591729900261896
>>> 100 * 2683028 / 4657598
57.60540089548304

(Notice how the first two percentages are correct, while the last one is not.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions