The Atan () method returns the inverse tangent of x, expressed in radians.
Syntax
The following is the syntax for the Atan () method:
Atan (x)
Note: This function is not directly accessible, so we need to import the math module and then call this function with the static object of math.
Parameters
- X--This must be a numeric value.
return value
This method returns the inverse tangent of x, expressed in radians.
Example
The following example shows the use of the Atan () method.
#!/usr/bin/pythonimport mathprint "Atan (0.64):", Math.atan (0.64) print "Atan (0):", Math.atan (0) print "Atan": ", Mat H.atan (+) print "Atan ( -1):", Math.atan ( -1) print "Atan (1):", Math.atan (1)
When we run the above program, it produces the following results:
Atan (0.64): 0.569313191101atan (0): 0.0atan (+): 1.4711276743atan ( -1): -0.785398163397atan (1): 0.785398163397