Calculating a 2D Vector's Cross Product

后端 未结 6 1816
既然无缘
既然无缘 2020-11-28 18:56

From wikipedia:

the cross product is a binary operation on two vectors in a three-dimensional Euclidean space that results in anothe

6条回答
  •  粉色の甜心
    2020-11-28 19:12

    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.

提交回复
热议问题