Corrected Arctangent
Compute the corrected arctangent of .
Arguments
| Argument | Description | Type | Constraints | Notes |
|---|---|---|---|---|
Return
| Value | Description | Type | Constraints | Notes |
|---|---|---|---|---|
| direction angle |
Usage
f_{atan2}\left(x,\ y\right)=\left\{x>0:\tan^{-1}\left(\frac{y}{x}\right),\ x<0:\ \left\{y<0:\tan^{-1}\left(\frac{y}{x}\right)-\pi,\tan^{-1}\left(\frac{y}{x}\right)+\pi\right\},\ x=0:\ \left\{y>0:\ \frac{\pi}{2},\ y<0:\ -\frac{\pi}{2},\ 0\right\},\ 0\right\}
\phi=f_{atan2}\left(P.x,\ P.y\right)
\left(t\cos\phi,\ t\sin\phi\right)
P=\left(0.2,\ 0.2\right) Implementation
Dependencies
None