mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 15:48:23 -05:00
voting ending fixed
This commit is contained in:
@@ -18,8 +18,11 @@ export const getPercentageFromCounts = (
|
||||
const otherSum = otherRegionArr[1] * -1 + otherRegionArr[2] * 1;
|
||||
const otherVoterCount = otherRegionArr.reduce((acc, cur) => acc + cur, 0);
|
||||
|
||||
return (
|
||||
((sameSum / sameVoterCount + otherSum / otherVoterCount + 3) / 6) * 100
|
||||
return parseFloat(
|
||||
(
|
||||
((sameSum / sameVoterCount + otherSum / otherVoterCount + 3) / 6) *
|
||||
100
|
||||
).toFixed(1)
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user