Quaternion and normalization

前端 未结 6 1422
遇见更好的自我
遇见更好的自我 2020-12-23 12:34

I know that quaternions need to be normalized if I want to rotate a vector.

But are there any reasons to not automatically normalize a quaternion? And if there are,

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-23 12:58

    Any operation that produces a quaternion will need to be normalized because floating-point precession errors will cause it to not be unit length.

    I would advise against standard routines performing normalization automatically for performance reasons. Any competent programmer should be aware of the precision issues and be able to normalize the quantities when necessary - and it is not always necessary to have a unit length quaternion.

    The same is true for vector operations.

提交回复
热议问题