mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-09-20 04:54:00 +02:00
Made it so that -2 to 0 votes has a chance in the randomizer.
This commit is contained in:
parent
ab3facdbcf
commit
a4affb9e4d
1 changed files with 4 additions and 2 deletions
6
index.js
6
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue