the atan could be removed as we are working with very small angles.