I have a width: 240 I have aspect ratio: 2.40 I need to get the height based on those two variables. What's the formula?
Calculate Height for Image/Video based on Aspect Ratio and Width
Asked Answered
Definition of the ratio:
ratio = width / height
Formula:
height = width / ratio = 240 / 2.40 = 100
And width = height * ratio –
Magus
This answer might also be usefull #8014978 –
Magus
example of calculating 2:40 . using javascript programming language.
var width = 240 ;
var rat1 = 2;
var rat2 = 40;
var ratio = width / rat1;
var calculated_height = ratio * rat2;
Thanks for simple and easy understanding of finding other value ..if we have one and the ratio.. :) –
Interosculate
© 2022 - 2024 — McMap. All rights reserved.