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?
Asked
Active
Viewed 4.0k times
2 Answers
70
Definition of the ratio:
ratio = width / height
Formula:
height = width / ratio = 240 / 2.40 = 100

Daniel Kvist
- 3,032
- 5
- 26
- 51

darma
- 4,687
- 1
- 24
- 25
-
7And width = height * ratio – Marian07 Aug 13 '15 at 10:53
-
3This answer might also be usefull http://stackoverflow.com/questions/8014478/169-aspect-ratio-with-fixed-width#answer-8014510 – Marian07 Jan 13 '16 at 14:22
10
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;

Softmixt
- 1,658
- 20
- 20
-
Thanks for simple and easy understanding of finding other value ..if we have one and the ratio.. :) – Sanjay Mangaroliya Jan 31 '20 at 06:13