Java Array Average average(final double[] values)

Here you can find the source of average(final double[] values)

Description

average

License

Apache License

Declaration

private static double average(final double[] values) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static double average(final double[] values) {
        double average = 0;
        for (final double value : values) {
            average += value;//from ww  w . ja  v a  2s.  com
        }
        final int divisor = values.length == 0 ? 1 : values.length;
        return average / divisor;
    }
}

Related

  1. average(double[] array)
  2. average(double[] d)
  3. average(double[] values)
  4. average(double[] values)
  5. average(double[] values)
  6. average(final Float... values)
  7. average(final float[] values)
  8. average(final int totalAmount, final int orderCount)
  9. average(final T p_num1, final T p_num2)