Calculate the arc tangent of a number.
XSharp.RT (in XSharp.RT.dll) Version: 2.18
Syntax Request Example
nNum AS USUAL
) AS FLOAT
public static Float ATan(
- Type: Usual
Any numeric value.
A number between -PI/2 and PI/2, representing the angle, in radians, whose tangent is equal to nNum
The result only spans half a circle (from -PI/2 to PI/2).|
This implies that Tan() and ATan() are not inverse functions for values that do not lie between -PI/2 and PI/2. In other words, ATan(Tan(n)) does not always return n. See the example below.
This example shows that, for a value of -1+PI, ATan() is not the inverse of Tan() but, for a value of -1, ATan() is the inverse of Tan().
This is because the tangent of -1+PI is equal to Tan(-1+PI) or -1.56.
The tangent of -1 is also equal to Tan(-1) or -1.56.
The ATan() of -1.56 is ATan(-1.56) or -1. Thus ATan(Tan(-1)) equals -1. But ATan(Tan(-1+PI)) equals -1 which is not equal to -1+PI.
1? ATan(Tan(-1+PI)) <paramref name="" /> -1+PI
2? ATan(Tan(-1)) = -1