Conversion between quaternions and Euler angles: Difference between revisions

Content deleted Content added
Eskivor (talk | contribs)
Source code: add precision
Quaternion norms are well defined independent of vector notation, as well as the modulus of a complex number, see: https://en.wikipedia.org/wiki/Quaternion#Conjugation,_the_norm,_and_reciprocal
Line 7:
A quaternion has 4 scaler values: {{mvar|q<sub>w</sub>}} (the real part) and {{mvar|q<sub>x</sub> q<sub>y</sub> q<sub>z</sub>}} (the imaginary part).
 
Defining the [[Quaternion#Conjugation,_the_norm,_and_reciprocal|norm of the quaternion]] as follows:
A ''unit quaternion'' satisfies this equation:
:<math display=block>\lVert q \rVert = \sqrt{\,q_w^2 + q_x^2 + q_y^2 + q_z^2 = 1~}</math>
 
A ''unit quaternion'' satisfies this equation:
<math display=block>\lVert q \rVert = 1</math>
 
We can associate a [[quaternion]] with a rotation around an axis by the following expression