/** * calculates the arithmetic medium of 4 values and add random value in * range of delta. */ protected static int middleValue(int a, int b, int c, int d, int delta) { int result = (((a + b + c + d) / 4) + normRNG(delta)); return result; }
/** * calculates the arithmetic medium of 3 values and add random value in * range of delta. */ protected static int middleValue(int a, int b, int c, int delta) { int result = (((a + b + c) / 3) + normRNG(delta)); return result; }