calculateRightAngleTriangleArea method

double calculateRightAngleTriangleArea(
  1. double base,
  2. double height
)

The area of a right-angled triangle can be calculated using the following formula:

Area=(2/1)×Base×Height

Where:

"Base" represents the length of the base of the right-angled triangle.

"Height" represents the height of the right-angled triangle, which is the perpendicular distance from the base to the right-angled vertex (the vertex where the right angle is formed).

Implementation

double calculateRightAngleTriangleArea(double base, double height) {
  return 0.5 * base * height;
}