I am messing around with the Graphics class and have noticed that the location and size of the rectangles I draw do not add up.
// Game.HEIGHT = 800
// Game.WIDTH = 800
g.drawRect(Game.WIDTH/2 -50, Game.HEIGHT/2 -50, 100, 100);
This should draw a rectangle in the enter of the screen just using math, but it is quite offset. I feel like I am missing something, because math wise this should work, and I could use some explanation.
question from:https://stackoverflow.com/questions/65877132/java-rectangle-location-is-wrong