Java Array Average average(double x, double y)

Here you can find the source of average(double x, double y)

Description

Average two numbers

License

Open Source License

Parameter

Parameter Description
x a parameter
y a parameter

Return

the average of x and y

Declaration

public static double average(double x, double y) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from ww  w.  j  av a2  s .  c om*/
     * Average two numbers
     * @param x
     * @param y
     * @return the average of x and y
     */
    public static double average(double x, double y) {
        return (x + y) / 2;
    }
}

Related

  1. average(Double sum, Double size)
  2. average(double values[])
  3. average(double x1, double x2)
  4. average(double... args)
  5. average(double... vals)
  6. average(double[] a)