How to calculate the signed angle between 2 vectors with a given axis normal in 3D?
<p>Suppose if I have two vectors, A and B, and an axis (normalized vector), how do I find the angle between A and B such that the angle difference between A after rotation(axis, angle) and B wrt to the given axis is 0. A doesnt have to be equal to B after the rotation. Basically I want to find the angle difference between A and B in a specified plane.</p>

<p>Note: this is different than finding the shortest angle between 2 vectors since the axis is not the cross product between A and B. Thus, technique <a href="http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/" rel="nofollow">here</a> (and many SO answers) does not apply. This needs to work in 3D.</p>