even better algorithm

This commit is contained in:
onezplpl 2024-08-04 18:18:46 -04:00
parent f14324fd68
commit afe7ffe8c3
No known key found for this signature in database
GPG key ID: 7EC026A136F9EEC3

View file

@ -19,7 +19,7 @@ async function genTree(treeId) {
console.log(entryDat); console.log(entryDat);
let s = Math.pow(0.5,(new Date() - new Date(entryDat.datetime_created.$date)) / (1000*60*60*24)) let s = 1 / ((new Date() - new Date(entryDat.datetime_created.$date)) + 1000*60*60);
sum += s; sum += s;
users[entryDat.username] = (us ? us : 0) + s; users[entryDat.username] = (us ? us : 0) + s;
entry = entryDat.parent_id; entry = entryDat.parent_id;