Added atan2 function