mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 22:47:12 +03:00
remove TODO comments
This commit is contained in:
committed by
Dainius Dauksevicius
parent
08d27265fc
commit
62b008e693
@@ -76,9 +76,8 @@ function getWeightedRandomChoice(choices: any[], amountOfChoices: number) {
|
||||
let totalWeight = 0;
|
||||
choices = choices.map(choice => {
|
||||
//The 3 makes -2 the minimum votes before being ignored completely
|
||||
//https://www.desmos.com/calculator/c1duhfrmts
|
||||
//this can be changed if this system increases in popularity.
|
||||
const weight = Math.exp((choice.votes + 3)); // TODO TYPESCRIPT what was this 0.85?
|
||||
const weight = Math.exp((choice.votes + 3));
|
||||
totalWeight += weight;
|
||||
|
||||
return {...choice, weight};
|
||||
|
||||
Reference in New Issue
Block a user