calcDiagonal function

num calcDiagonal(
  1. num width,
  2. num height
)

This function is used to calculate diagonal of given Rect's width and height.

Implementation

num calcDiagonal(num width, num height) {
  return math.sqrt(width * width + height * height);
}