Kevin Trometer 7 years ago
parent
commit
d6accebea8
1 changed files with 3 additions and 10 deletions
  1. 3 10
      src/ui/view/UnitGraph.java

+ 3 - 10
src/ui/view/UnitGraph.java

@@ -175,8 +175,8 @@ class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, Co
 		g2.setStroke(new BasicStroke(1));
 		g2.drawLine((model.getCurIteration()) * this.getWidth() / (model.getIterations() - 1), 0,
 				(model.getCurIteration()) * this.getWidth() / (model.getIterations() - 1), this.getHeight());
-		
-		//algorithmus
+
+		// algorithmus
 		controller.calculateStateForTimeStep(model.getCurIteration());
 	}
 
@@ -584,14 +584,7 @@ class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, Co
 			MAXIMUM = he.getEnergy();
 			he.setGraphPoints((LinkedList<Point>) pointList.clone());
 			for (int i = 0; i < arrayOfFloats.length; i++) {
-				if (he.getEnergy() >= 0) {
-					he.getEnergyAt()[i] = convertToValueY(
-							getYValueAt_2((int) (i * width / (model.getIterations() - 1))));
-				} else {
-					he.getEnergyAt()[i] = -convertToValueY(
-							getYValueAt_2((int) (i * width / (model.getIterations() - 1))));
-				}
-
+				he.getEnergyAt()[i] = convertToValueY(getYValueAt_2((int) (i * width / (model.getIterations() - 1))));
 			}
 			arrayOfFloats = he.getEnergyAt();
 		}