refine convert functions from atan2 to atan if the sign is defined
correct pep8