Selaa lähdekoodia

smallfitness edits

Rolf Egert 5 vuotta sitten
vanhempi
commit
40e4fbf9b1
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/exampleAlgorithms/Evaluation.java

+ 2 - 2
src/exampleAlgorithms/Evaluation.java

@@ -113,10 +113,10 @@ public class Evaluation {
 			result = 1000;
 	*/
 		if(supplyPercentage <= 1.0) {
-			result = Math.pow(5,((100 - (supplyPercentage*100))/50 + 2)) - Math.pow(5, 2);
+			result = Math.pow(5,(Math.abs((100 - (supplyPercentage*100)))/50 + 2)) - Math.pow(5, 2);
 		}
 		else {
-			result = Math.pow(6,((100 - (supplyPercentage*100))/50 + 2)) - Math.pow(6, 2);
+			result = Math.pow(6,(Math.abs((100 - (supplyPercentage*100)))/50 + 2)) - Math.pow(6, 2);
 		}
 		
 		return result;