A vector has x, y, and z components of Ax, Ay, and Az. I want to calculate the angle between the vector and the x-axis (call it theta).
I work out the following:
sqrt(Ax*Ax + Az*Az) * cos(theta) = Az
sqrt(Ax*Ax + Az*Az) * sin(theta) = Ax
So that theta = arctan(Ax/Az).
But the notes I have state a different equation for theta:
theta = arctan(Ax / sqrt(Az*Az + Ay*Ay))
Could you please tell me where I am going wrong, and how the notes get the answer?