Made it so that -2 to 0 votes has a chance in the randomizer.

This commit is contained in:
Ajay Ramachandran 2019-07-15 22:32:08 -04:00
parent ab3facdbcf
commit a4affb9e4d

View file

@ -226,9 +226,11 @@ function getVoteOrganisedSponsorTimes(sponsorTimes, votes, UUIDs) {
let sqrtVotesList = [];
let totalSqrtVotes = 0;
for (let j = 0; j < similarSponsorsGroups[i].length; j++) {
//multiplying by 10 makes the 10 votes the point where it the votes start not mattering as much
//multiplying by 10 makes around 13 votes the point where it the votes start not mattering as much (10 + 3)
//The 3 makes -2 the minimum votes before being ignored completely
//https://www.desmos.com/calculator/ljftxolg9j
//this can be changed if this system increases in popularity.
let sqrtVote = Math.sqrt(votes[similarSponsorsGroups[i][j]] * 10);
let sqrtVote = Math.sqrt((votes[similarSponsorsGroups[i][j]] + 3) * 10);
sqrtVotesList.push(sqrtVote)
totalSqrtVotes += sqrtVote;