title: How to get X and Y rotation from two 3D direction vector (Zero Z rotation)
body: <p>I have two 3D direction (normalized) vector A and B. I am looking for the Euler angles to rotate A into B. I know it has many solution because it is possible to rotate a normal vector anywhere with just using two axis like X and Y or roll and pitch. I have to find the solution where the Z rotation is Zero.</p>
  
  <p>I would like to create a function like this:</p>
  
  <pre><code>Vector3 dir1 (0, 1, 0);
  Vector3 someRotation(Pi / 4, Pi / 4, 0);
  Vector3 dir2 = dir1.rotateXYZ(someRotation);
  
  Vector3 xyRotation = dir1.eulerToDirection(dir2);
  
  // now I expect that the eulerToDirection fv calculated the X, Y rotation from the vectors at Z = 0
  // so xyRotation.x == Pi / 4 &amp;&amp; xyRotation.y == Pi / 4 &amp;&amp; xyRotation.z == 0 is true
  // aside from the floating point error
  </code></pre>
  
  <p>Of corse the <code>some rotation</code> not always 0 at the Z. It is just for the example</p>