static short avgShort(short a, short b) { ret (short) (((int a)+b)/2); }