본문 바로가기
개발/Python

Python의 arctan, arctan2 차이

by belitino 2020. 9. 13.

출처: https://simmmmmk.tistory.com/42

 

Python의 arctan, arctan2 차이가 뭔지 궁금해서 구글링 해보니 출처에 잘 나와있네요.

 

numpy.arctan(x1, x2)

  • arc tangent of x1/x2.
  • 출력 범위가 [-pi/2, pi/2]
  • 180도 이상 차이나는 각의 arctan 값은 구분이 안됨(ex: arctan(0), arctan(180) 은 같음).

numpy.arctan2(x1, x2)

  • arc tangent of x1/x2.
  • 출력 범위가 [-pi, pi]
  • C언어 atan2 함수와 같음.