I’m working on a project in SDL2, here’s my code for getting the screen with and height in a 16:9 format.
const int SCREEN_WIDTH = 320;
const int SCREEN_HEIGHT = SCREEN_WIDTH/(16/9);
This looks like it would set the screen height to 180 which is what it should be if the math is done correctly. However it sets it to 320.
1