Another useful property of the cross product is that its magnitude is related to the sine of the angle between the two vectors:
| a x b | = |a| . |b| . sine(theta)
or
sine(theta) = | a x b | / (|a| . |b|)
So, in implementation 1 above, if a
and b
are known in advance to be unit vectors then the result of that function is exactly that sine() value.