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 3.6k times
2 Answers
65
Definition of the ratio:
ratio = width / height
Formula:
height = width / ratio = 240 / 2.40 = 100
Daniel Kvist
- 2,872
- 5
- 25
- 49
darma
- 4,592
- 1
- 22
- 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,568
- 19
- 18
-
Thanks for simple and easy understanding of finding other value ..if we have one and the ratio.. :) – Kunsh Technologies Jan 31 '20 at 06:13