fixed (atan X 0)

fixed a bug that caused atan to return the wrong result when its second argument was 0