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.
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.