Lets say we have two vectors, Vector a (1, 0, 0) and b (0, 1, 0). If we want to rotate from a to b we need to find dot product for angle like angle = cos-1 (a.b) and we need to take a cross product for rotation vector that is (0, 0, 1).

But what if the two vectors are collinear, like for eg. both are (0, 1, 0). Then the cross product is (0, 0, 0) that is its magnitude is 0. So its no rotation, but how do we need to handle this in code ?

Should we test for this case or we can just leave it with its magnitude 0 ?