-1

I can not figure this one out...tried alot. I have an application that need images in aspect ratio: 56:37

I need a method that takes the width as input and returns the height that matches the aspect ratio.

Any tips? Im stuck on this one.

2 Answers2

1

In other words applying the formula is =>

(original height / original width) x new width = new height

0

An aspect ratio of 56:37 means

width:height = 56:37,

or written as a division (or fraction):

width/height = 56/37

which can be rewritten as

height = width*37/56

JohanC
  • 71,591
  • 8
  • 33
  • 66