Skip to content

Commit

Permalink
small speed improvement)
Browse files Browse the repository at this point in the history
  • Loading branch information
Prevter committed May 9, 2021
1 parent 7524a84 commit ef4d322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FloatToolGUI/Calculation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ static class Calculation
static public decimal craft(List<InputSkin> ingridients, float minFloat, float maxFloat)
{
decimal avgFloat = 0;
foreach (InputSkin f in ingridients)
for (int i = 0; i < 10; i++)
{
avgFloat += f.WearValue;
avgFloat += ingridients[i].WearValue;
}
avgFloat /= 10;
return ((decimal)(maxFloat - minFloat) * avgFloat) + (decimal)minFloat;
Expand Down

0 comments on commit ef4d322

Please sign in to comment.