Skip to content

Commit

Permalink
Update calc.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rowandwhelan authored Oct 11, 2024
1 parent f9a18e0 commit 690fb4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function calculateFabricatorsRequired() {
var firePercentage = document.getElementById("firePercentage").value / 100;
var ammoConsumptionRate = document.getElementById("ammoConsumptionRate").value;
var turretNumber = document.getElementById("numTurrets").value;
var fabricatorsRequired = Math.ceil((ammoConsumptionRate * turretNumber * firePercentage * 0.5) / productionRate);
var fabricatorsRequired = Math.ceil(productionRate / (ammoConsumptionRate * turretNumber * firePercentage * 0.5));
document.getElementById("fabricatorsRequired").value = fabricatorsRequired;
}

Expand Down

0 comments on commit 690fb4d

Please sign in to comment.