Performs the arctangent of the relationship between arg1 and arg2 (arg1/arg2).
Syntax |
real atan2 (real arg1, real arg2) |
---|---|
arg1 |
First argument of the arctangent, i.e., sine value (or numerator) |
arg2 |
Second argument of the arctangent, that is, value of the cosine (or denominator) |
Result |
In contrast to atan(), the function atan2 calculates a result between -K_PI and K_PI depending on the signs of its two arguments |
Validity |
Rule, Task |
Note |
In the particular case where arg2 is equal to 0, the result will be:
•+K_PIMEZZI if arg1 > 0
•-K_PIMEZZI if arg1 < 0
•0 if arg1 = 0
Example of use:
Esempio di utilizzo: |