## Solving the angle problem: How to find the rotation between two vectors.

*This solution is implemented in the Math class and will be invoked by the bezier curve-following IK method in the SkeletonNode class.*

Given two normalised vectors, the cosine of the angle between them can be found using the dot product:

quat rotation(vec3 v1, vec3 v2) { // v1 dot v2 = |v1| * |v2| * angle_cos // If the vectors are normalised, their magnitudes will be '1', and so: v1 = normalise(v1) v2 = normalise(v2) float angle_cos = dot(v1, v2) ...

The rotation axis can be found using the cross product of both vectors:

...rotation() cont'd... vec3 axis = normalise(cross(v1, v2)) ...

## Optimal forms for creating quaternion:

Naive `rotation()` method (ignoring special cases such as angle=0):

...rotation() cont'd... float angle = acos(angle_cos) return quaternion_from_axisangle(angle, axis) }

The `quaternion_from_axisangle()` function likely uses trigonometry (such as the cosine function) to convert the given ...