Fixed extra i++ addition overflowing arctan