|
Array issues
Hi folks
I been doing some coding wth java (JDK) and I found this method inconvienient for an array of length 6:
static void check(int z1,int z2,int z3,int z4,int z5,int z6,int pt1,int pt2,int size){
boolean verify = ((pt2 <= z2 + 20) && (pt2 >= z2 - 20) && (pt1 <= z1 + 20) && (pt1 >= z1 - 20))
|| ((pt2 <= z4 + 20) && (pt2 >= z4 - 20) && (pt1 <= z3 + 20) && (pt1 >= z3 - 20))
Continues to array 6
Is there a quicker method in completing these calculations?
Thanks
Gregory
|