web -> desktop

This commit is contained in:
Alexey Kasyanchuk
2018-01-31 19:02:28 +03:00
parent 0e4888ab76
commit d8afce8964
95 changed files with 10679 additions and 1893 deletions

17
src/app/rating.js Normal file
View File

@ -0,0 +1,17 @@
function biasValuation(count, min, avrg, avrg_const)
{
return ((count / (count + min)) * avrg) + ((min / (min + count)) * avrg_const);
}
function rating(good, bad){
if (good + bad > 0)
{
return biasValuation(good + bad, 9, good / (good + bad), 0.45);
}
else
{
return 0;
}
}
module.exports = rating;