Skip to content

Commit

Permalink
Refactor another calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
RoanH committed Aug 26, 2020
1 parent a355d75 commit 9164313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion KeysPerSecond/src/me/roan/kps/panels/GraphPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void paintComponent(Graphics g1){
}
g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, Main.config.getForegroundOpacity()));
if(Main.config.graphAvg){
int y = (int)(this.getHeight() - Main.config.borderOffset - RenderingMode.insideOffset - ((float)(this.getHeight() - (Main.config.borderOffset + RenderingMode.insideOffset) * 2) * (Main.avg / (float)maxval)));
int y = (int)(this.getHeight() - Main.config.borderOffset - RenderingMode.insideOffset - (((this.getHeight() - (Main.config.borderOffset + RenderingMode.insideOffset) * 2) * Main.avg) / maxval));
g.setColor(Main.config.getForegroundColor().darker());
g.setStroke(avgstroke);
g.drawLine(Main.config.borderOffset + RenderingMode.insideOffset, y, this.getWidth() - Main.config.borderOffset - RenderingMode.insideOffset - 2, y);
Expand Down

0 comments on commit 9164313

Please sign in to comment.