Skip to content

Commit

Permalink
Update calc.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rowandwhelan authored Jul 31, 2024
1 parent 7c0e03f commit c875dd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/calc.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ function calculateLoadingType() {

function calculateSpeed() {
var thrusterCount = document.getElementById("thrusterCount").value;
if (Math.floor((0.4 * (((thrusterCount-1) / 4) * 2000 + 2000)) / (((trueShipX+2) * (trueShipY+2)) ** 0.5 * 2)) > 60) {
if (Math.floor((20 + 0.4 * ((thrusterCount-1) * 750 + 1125)) / (((trueShipX+2) * (trueShipY+2)) ** 0.5 * 2)) > 60) {
document.getElementById("label-for-thrusterCount").innerText = "Total number of thrusters [above speed limit]:";
document.getElementById("thrusterCount").style.borderColor = 'red';
} else if (Math.floor((0.4 * ((thrusterCount / 4) * 2000 + 2000)) / (((trueShipX+2) * (trueShipY+2)) ** 0.5 * 2)) < 60) {
} else if (Math.floor((20 + 0.4 * (thrusterCount * 750 + 1125)) / (((trueShipX+2) * (trueShipY+2)) ** 0.5 * 2)) < 60) {
document.getElementById("label-for-thrusterCount").innerText = "Total number of thrusters [below speed limit]:";
document.getElementById("thrusterCount").style.borderColor = 'red';
} else {
Expand Down

0 comments on commit c875dd0

Please sign in to comment.