How to find aspect ratio of a width

Kippykip

CEO of cancelled
cringge
THIS IS HOW
I couldn't find this anywhere and guessed it when I saw the 4:3 ratio thingys

This is how...
Ready for this??

Say we have 640x480
We want to find 480 with just the 640 number
We know it's a 4:3 resolution but what does this mean?

You do:
Code:
640 / 4 * 3
That's how...

You divide by the first number which would be
Code:
640 / 4 = 160
Then you times it by the 2nd number
Code:
160 * 3 = 480

TADA! Lets try this on another ratio
Lets find the 16:9 resolution from 1920

Code:
1920 / 16 * 9 = 1080

HOPE THIS HELPS IN YOUR WIDESCREEN RATIO DETECTION AHAW
 

NecroWolf

Active Lad
Member
That's more on verifying than detecting it. Just divide width by height and refer to this chart:

1.33:1 = ( 4:3 )
1.78:1 = ( 16:9 )
1.85:1 = ( 37:20 )
2.20:1 = ( 11:5 )
2.35:1 = ( 47:20 )
 

Kippykip

CEO of cancelled
cringge
NecroWolf said:
That's more on verifying than detecting it. Just divide width by height and refer to this chart:

1.33:1 = ( 4:3 )
1.78:1 = ( 16:9 )
1.85:1 = ( 37:20 )
2.20:1 = ( 11:5 )
2.35:1 = ( 47:20 )
Well yeah verifying is what I meant.
I used it in my game to find out what aspect ratio the game resolution is in so it can scale images and change the fov accordingly
 
Top