calculateNewWidth function

double calculateNewWidth(
  1. double originalWidth,
  2. double originalHeight,
  3. double newHeight
)

Implementation

double calculateNewWidth(
    double originalWidth, double originalHeight, double newHeight) {
  return (originalWidth / originalHeight) * newHeight;
}