3 ms·
It's easier to translate math concepts with origin at bottom left. I remember having a hard time translating raycasting code to top left coordinates of pygame b
by victorclf 4y ago
It's easier to translate math concepts with origin at bottom left. I remember having a hard time translating raycasting code to top left coordinates of pygame because it messed with the signs of sin, cos and tan.
Some libraries like to use top left coordinates because they are conceptually easier for stuff such as displaying rows of text and we are used to top to bottom ordering of things.
- philipov 4y agoNot just for displaying text, but monitors have traditionally updated from left-to-right, top down. If you update the frame buffer in the middle of the screen refreshing, you end up with screen tearing, which is when the frame that gets drawn has the top of the previous frame, and torn in the middle to display the next frame below.