글
From Wikipedia atan2(x)
삼각법에서 atan2는 아크탄젠트함수에 대한 2 argument를 가지는 변형함수로 positive x축에서 좌표 (x, y)까지의 각도를 라디안(radian)으로 반환한다.
atan2함수는 컴퓨터 프로그래밍 언어에서 처음 도입되었으나 현재는 과학, 엔지니어링 분야에서 일반적으로 사용되고 있다.
atan2(x, y)함수는 다음과 같은 조건으로 atan함수로 표현될 수 있다.
Notes:
- This produces results in the range (-π,π], which can be mapped to [0,2π) by adding 2π to negative values.
- Traditionally, atan2(0,0) is undefined.
- The C function, and most other computer implementations, are designed to reduce the effort of transforming cartesian to polar coordinates and so always define atan2(0,0). On implementations without signed zero, or when given positive zero arguments, it is normally defined as 0. It will always return a value in the range [-π,π] rather than raising an error or returning a NaN (Not a Number).
- Systems supporting symbolic mathematics normally return an undefined value for atan2(0,0) or otherwise signal that an abnormal condition has arisen.
- For systems, for example IEEE floating point, implementing signed zero, infinities, or Not a Number it is usual to implement reasonable extensions which may extend the range of values produced to include -π and -0. These also may return NaN or raise an exception when given a NaN argument.
RECENT COMMENT