The math.atan()
function returns the trigonometric inverse tangent (also known as arc tangent) of a number.
math.atan(x)
Where x
is the number for which you want to find the inverse tangent. The function computes the angle (in radians) whose tangent is equal to x.
import math
number = 1
inverse_tangent = math.atan(number)
print(inverse_tangent)
In the above case, the inverse tangent of 1 is approximately 0.7853981633974483
radians. We can use the math.degrees() to get the angle in degrees.
import math
number = 1
inverse_tangent = math.atan(number)
print(math.degrees(inverse_tangent))
import math
print(math.degrees(math.atan(5.671281819617707)))
print(math.degrees(math.atan(3.7320508075688776)))
print(math.degrees(math.atan(1.7320508075688767)))
print(math.degrees(math.atan(0.5773502691896257)))