Skip to content

Commit

Permalink
Fixed small bug of stepsize not resetting to new inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
GitStudying authored Aug 5, 2023
1 parent 1cdd970 commit acdf696
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h2>Help and information</h2>
{
errorFeedback('platform');
}
var stepsize = 0.01;
var stepsize;
var finalaccuracy = 0.004; // As long as sub 1 cent, not noticable in any calculation or visual display
var firsttime = true;
var iter = 0;
Expand Down Expand Up @@ -319,6 +319,7 @@ <h2>Help and information</h2>
document.getElementById("platresult").innerHTML = "Selling platform: Total cost " + plat_cost.toFixed(2);
}
firsttime = false;
stepsize = 0.01;
} else if(Math.abs(profit) > finalaccuracy)
{
stepsize = Math.abs(profit) / 10;
Expand Down

0 comments on commit acdf696

Please sign in to comment.