Android Utililty Methods Array Average

List of utility methods to do Array Average

Description

The list of methods to do Array Average are organized into topic(s).

Method

intgetArrayAvg(int... i)
get Array Avg
return getArraySum(i) / i.length;
intaverage(double[] pixels)
average
float m = 0;
for (int i = 0; i < pixels.length; ++i) {
    m += pixels[i];
m = m / pixels.length;
return (int) m;
intaverage(int[] pixels)
average
float m = 0;
for (int i = 0; i < pixels.length; ++i) {
    m += pixels[i];
m = m / pixels.length;
return (int) m;