I came across this stack overflow question titled Proper conversion between Quaternions and Spherical Rotation Coordinates? but trying the code out, the result did not equal my