Skip to content

Commit

Permalink
Merge pull request #450 from tigattack/patch-1
Browse files Browse the repository at this point in the history
Fix calculation of negative percentages in `getPercentMore`
  • Loading branch information
Yooooomi authored Nov 24, 2024
2 parents 10c73de + 8b5d6ee commit ccdb644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/client/src/services/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,5 +323,5 @@ export const getPercentMore = (old: number, now: number) => {
if (now > old) {
return Math.floor((now / old - 1) * 100);
}
return -(1 - Math.floor(old / now));
return Math.floor((1 - now / old) * 100) * -1;
};

0 comments on commit ccdb644

Please sign in to comment.