Replaced Floor with round

For better accuracy, otherwise discrepancies of 1 or 2 may be present. Not really a big deal but still.
This commit is contained in:
Legendsmith 2019-10-08 17:32:56 +11:00
parent 76e51de1dc
commit 8e36532142
2 changed files with 5 additions and 4 deletions

View file

@ -773,8 +773,8 @@ function editProvinces() {
data += el.dataset.capital + ",";
data += el.dataset.area + ",";
data += el.dataset.population + ",";
data += `${Math.floor(pack.provinces[key].rural*populationRate.value)},`
data += `${Math.floor(pack.provinces[key].urban*populationRate.value)}\n`
data += `${Math.round(pack.provinces[key].rural*populationRate.value)},`
data += `${Math.round(pack.provinces[key].urban*populationRate.value)}\n`
});
const dataBlob = new Blob([data], {type: "text/plain"});