Closed yungbuck81 closed 1 year ago
Do you have a sample API call where this is happening?
Match ID 7329517346. The KDA value on tide is rounded down from 2.55555556 to 2. In our league of 12-20 teams playing two games per week we've seen some kda discrepancies for a while now when we avg the two games.
Similarly in Match ID 7329550501, player 9 has their KDA rounded down from what would be 3.5 to 3. https://api.opendota.com/api/matches/7329550501
Yeah looks like it's indeed rounded down, wonder what the plan was here https://github.com/odota/core/blob/7f122c9447a93f3bb053cdf602bfa5026cd85c20/util/compute.js#L74
Anyways you could also just calculate the kda from the kills, assists and deaths yourselves
Looks like I wrote that code like 8 years ago haha so it's probably my fault. We probably could just replace it with Math.round and add a few decimals
That would be awesome if you would be willing to do that!
Thanks so much for doing this!
Would it be possible to add 2-3 decimal points to the KDA query for players in matches? Currently it rounds it down to the nearest integer and can skew decently far when pulling multiple games of data and averaging a players kda for a set of matches. In one instance, we had two players whose avg kda shouldve been separated by 3 after each playing two matches, yet because of the rounding down to whole integers for each game, they were the same.