calculateNewHeight function

double calculateNewHeight(
  1. double originalWidth,
  2. double originalHeight,
  3. double newWidth
)

Implementation

double calculateNewHeight(
    double originalWidth, double originalHeight, double newWidth) {
  return (originalHeight * newWidth) / originalWidth;
}