From a4affb9e4d85cb847e7492f496680b4e94551296 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 15 Jul 2019 22:32:08 -0400 Subject: [PATCH] Made it so that -2 to 0 votes has a chance in the randomizer. --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0a5b501..cf96cce 100644 --- a/index.js +++ b/index.js @@ -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;