title: The X angle between two 3D vectors?
body: <p>I have two 3D vectors called A and B that both only have a 3D position. I know how to find the angle along the unit circle ranging from 0-360 degrees with the atan2 function by doing:</p>
  
  <p>EDIT: (my atan2 function made no sense, now it should find the "y-angle" between 2 vectors):</p>
  
  <pre><code>toDegrees(atan2(A.x-B.x,A.z-B.z))+180
  </code></pre>
  
  <p>But that gives me the Y angle between the 2 vectors.
  I need to find the X angle between them. It has to do with using the x, y and z position values. Not the x and z only, because that gives the Y angle between the two vectors.
  I need the X angle, I know it sounds vague but I don't know how to explain. Maybe for example you have a camera in 3D space, if you look up or down than you rotate the x-axis. But now I need to get the "up/down" angle between the 2 vectors. If I rotate that 3D camera along the y-axis, the x-axis doens't change. So with the 2 vectors, no matter what the "y-angle" is between them, the x-angle between the 2 vectors wil stay the same if y-angle changes because it's the "up/down" angle, like in the camara.</p>
  
  <p>Please help? I just need a line of math/pseudocode, or explanation. :)</p>