What’s the algorithm to calculate aspect ratio?
I gather you’re looking for an usable aspect ratio integer:integer solution like 16:9 rather than a float:1 solution like 1.77778:1. If so, what you need to do is find the greatest common divisor (GCD) and divide both values by that. The GCD is the highest number that evenly divides both numbers. So the GCD for … Read more