Share via


UnsafeNativeMethods.Quaternion.Exp(Quaternion,Quaternion) Method (Microsoft.DirectX)

Calculates the exponential.

Note: For programming in Microsoft Visual Basic .NET or Microsoft JScript .NET, use the equivalent method in the Microsoft.DirectX structures.

Definition

Visual Basic Public Shared Function Exp( _
    ByVal pOut As Quaternion, _
    ByVal pQuat As Quaternion _
) As Quaternion
C# public static Quaternion Exp(
    Quaternion pOut,
    Quaternion pQuat
);
C++ public:
static Quaternion Exp(
    Quaternion pOut,
    Quaternion pQuat
);
JScript public static function Exp(
    pOut : Quaternion,
    pQuat : Quaternion
) : Quaternion;

Parameters

pOut Microsoft.DirectX.Quaternion
The Quaternion structure that is the exponential of the pQuat parameter.
pQuat Microsoft.DirectX.Quaternion
Source Quaternion structure.

Return Value

Microsoft.DirectX.Quaternion
The Quaternion structure that is the exponential of the pQuat parameter.

Remarks

The Exp method converts a pure quaternion to a unit quaternion. The method expects a pure quaternion, where w is ignored in the calculation (w == 0). In the following example, v represents the vector portion of a quaternion.

Given a pure quaternion defined by:
q = (0, theta * v); 

This method calculates the exponential result.
exp(Q) = (cos(theta), sin(theta) * v)

The return value for this method is the same value returned in the pOut parameter. This allows you to use the Exp method as a parameter for another method.

See Also