Calculate Size maintaining aspect ratio

Given a size, calculate the increase or decrease of the size maintaining the aspect-ratio

Original Size

First introduce the original width and height of the element.

*Both measurements are required for this to work.

Desired size

Now, introduce the width or the height desired.

Only one is required.

New size