average static method

double average(
  1. double x1,
  2. double x2
)

Computes the average of two numbers.

@param x1 a number @param x2 a number @return the average of the inputs

Implementation

static double average(double x1, double x2) {
  return (x1 + x2) / 2.0;
}