Update ArrayQueue.java

improved math for computing circularIndex