List of utility methods to do Array Average
int | getArrayAvg(int... i) get Array Avg return getArraySum(i) / i.length;
|
int | average(double[] pixels) average float m = 0; for (int i = 0; i < pixels.length; ++i) { m += pixels[i]; m = m / pixels.length; return (int) m; |
int | average(int[] pixels) average float m = 0; for (int i = 0; i < pixels.length; ++i) { m += pixels[i]; m = m / pixels.length; return (int) m; |