| QuaternionDMultiply Method (QuaternionD, QuaternionD) |
Multiplies two quaternions.
Namespace: DigitalRune.Mathematics.AlgebraAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public static QuaternionD Multiply(
QuaternionD q1,
QuaternionD q2
)
Public Shared Function Multiply (
q1 As QuaternionD,
q2 As QuaternionD
) As QuaternionD
public:
static QuaternionD Multiply(
QuaternionD q1,
QuaternionD q2
)
static member Multiply :
q1 : QuaternionD *
q2 : QuaternionD -> QuaternionD
Parameters
- q1
- Type: DigitalRune.Mathematics.AlgebraQuaternionD
The first quaternion. - q2
- Type: DigitalRune.Mathematics.AlgebraQuaternionD
The second quaternion.
Return Value
Type:
QuaternionDThe product of the two quaternions.
Remarks
If the quaternions are unit quaternions, then each quaternion represents a rotation in
3-dimensional space. The product of two unit quaternions is the concatenation of the two
rotations.
q1 . q2 is the same as M1 . M2,
where M1 and M2 are the equivalent matrices
(M1 specifies the same rotation as q1 and
M2 specifies the same rotation as q2).
The multiplication is non-commutative. The operation is also known as the Grassman
product of quaternions.
The multiplication is defined as:
q1q2 = (w1w2 -
v1 ∙ v2,
v1 x v2 + w1v2 + w2v1)
See Also